Archive for the ‘ASP.Net’ Category

HTML 5 or Silverlight 5: Hey why not use them for what they are good at!

A few days ago, Scott Hanselman proposed a different opinion as well as a good way of deciding which of the 2 technologies to be used and when!

Read here:

I personally think that HTML 5, will get there and do what browsers do best: Be used everywhere!

Yes it will bring awesomeness and shiny cool new things… and it will bring some new problems as well.

My fear is when people start talking about HTML 5 as a way to produce a business application that should be in fact a desktop version. Do you get me?

At one point, developpers have to stop trying to tweak their web app to make it behave behave like a desktop …. It’ll never be one!

A plugin based app IS sometime more appropriate than a web app just like a native platform app IS sometimes better than a pluging!

Desktop > Plugin > Web App

or if you prefer:

WPF > SilverLight > Asp.Net


All MIX 11 Session Video via RSS, iTunes, Powershell or Juice!

Thanks to Scott Hanselman, who brought this up!

Like Scott said, If you really want iTunes in your life…you can subscribe in iTunes from Advanced|Subscribe to Podcast (look for MIX11 Sessions)

But I find it cooler with Zune! The video is super crisp in MP4 High! 🙂

Tell me the ones you liked the most! There is soooo much information. Almost everything applies on technologies available today!

My best (in descending order) are :

  1. An Overview of the MS Web Stack of Love,
  2. NuGet In Depth: Empowering Open Source on the .NET Platform
  3. ASP.NET MVC 3 @:The Time is Now
  4. Fun with ASP.NET MVC 3 and MEF
  5. Deconstructing Orchard: Build, Customize, Extend, Ship
  6. Good JavaScript Habits for C# Developers

My worse is:

  1. Application Design for Windows Phone (She is so nervous and thirsty…)

.Net and the “Freemium” world!

November 8, 2010 1 comment

“Freemium”, A new trend in commercial web application deployment?

According to wikipedia the “Freemium” is:

Freemium is a business model that works by offering basic Web services, or a basic downloadable digital product, for free, while charging a premium for advanced or special features.”

This is a great way to present and market a web application at low cost. Now this has to do with .Net?

Well this summer Microsoft MSDN has publish a web application toolkit for Freemium applications:

Cool huh ?

Tonight, I will hop in there and have a look at the implementation details. So stick around for updates!

Categories: ASP.Net, ASP.Net MVC


October 20, 2010 Leave a comment

Last weekend, I went and read “Professional ASP.Net MVC 2” . All of it!

Although, I already had my hands dirty with version 1 of ASP.Net MVC, I felt that the niche and orientation of the language was clearer than ever.

If you are like me, someone that had to deal with trying to make testable web applications in past, with VS Interdev (pure asp), or with

You’ll find that the language is really helping you with achiving your goal!

In fact, I would rename ASP.Net to “ASP.Net RAD”   and ASP.Net MVC to “ASP.Net Pro”. 😉

It is true that you can probably create a semi complex web application faster with ASP.Net.

But an experienced ASP.Net MVC developper, will probably do it in the same time in MVC and it’ll be clean, professional, and testable! 

Now, I can’t wait for version 3 of asp.Net MVC which is coming soon!

Categories: ASP.Net, ASP.Net MVC Tags: ,

VS 2010 and .NET 4 Series

August 26, 2009 Leave a comment

Clean Web.Config Files (VS 2010 and .NET 4.0 Series)
A cleaner web.config file is to be expected in .Net 4.0!
Categories: ASP.Net

Getting Global in ASP.Net!


Yesterday, I had a discussion with my boss and a colleague about getting our ASP.Net web application to use the browser settings for “HTTP_ACCEPT_LANGUAGE”.

Currently our application support for this is very limited. And being in a part of the world that officially supports two languages (French and English) doesn’t not make the job easy for a web developer.

That topic came to my mind after a playing with Microsoft Dynamics CRM 4.0 witch is completely written in .Net Framework 2.0. The way they handle the issue in Dynamics provides a pretty good user experience and a flawless experience as well. The end user can customize language, date, and number format in Dynamics as much as they could in the regional settings of their windows control panel. And Dynamics applications currently support close to 40 different languages!

After doing a bit of research, I found out (thanks to that there’s a setting we can put in the web.config file to automatically “bind” the display to the end user browser setting.

Here it is:

<globalization enableClientBasedCulture="true" />

MSDN describes enableClientBasedCulture as follows: “Gets or sets a value indicating whether the Culture and UICulture properties should be based on the AcceptLanguage header field value that is sent by the client browser.” (See it here)

Next question is, suppose I have to display a number in French which should display like this 123 456 789,00 but the web server or database server is set for en-US, what do I do?

Answer is simple, there are 2 cultures working together is .Net: The thread’s culture which represents the server in our case and the UI culture which in the case of an ASP.Net application is still on the server, but is use for rendering output and applying resources using the ResourceManager. So I would have to basically “format” my number from 123,456,789.00 coming from the server in en-US to 123 456 789,00 which is the desired output of my end-user.

There comes in play the second argument of the Convert.To…() method that nobody uses but should, the IFormatProvider. If you pass an instance of a culture (which already implement IFormatProvider), to the Convert To method you’ll get the desired result. Given that nobody started to play with the UICulture somewhere else in the code!

   1:  decimal numberFromTheServer;  //123,456,789.00
   2:  TextBox1.Text = Convert.ToString(numberFromTheServer, CultureInfo.CurrentUICulture);
   3:   //Will return “123 456 789,00” is UI culture is set to fr-CA.

Same will happen for dates!

This is yet another reason why people should quit using the Microsoft.VisualBasic Namespace!

I know this discussion is a bag of worms, but even if half of the blogs and forums out there are saying that CStr and CDate or FormatNumber are faster than their .Net counterparts, I just say to myself that they are lying! Why, because for example CStr() doesn’t do the same work as Convert.ToString(). In my sense the Microsoft.VisualBasic Namespace is present in case you have to play with legacy VB stuff and to provider a smoother migration to .Net.

It doesn’t take into consideration the UI culture! And the following remark is displayed on MSDN when you really want to take a look at it!



To be as flexible as Dynamics is hard but not totally impossible. I plan to do extra research on how to apply this technique on a whole web application with dozens of pages and dozens of controls. My plan is to come up with an anonymous method that would allow go back and forth from one culture to the other.

Comments or help on this matter are always welcome! 

Categories: ASP.Net