Maintaining .Net Browser Compatibility

The .Net framework has a set of predefined browser capabilities. In short, this means that dependending of the browser being used, .Net will create the appropriate HTML.
Unfortunately, sometimes it does not work as expected. Plus, .Net is not capable of keeping up with the speed of the release cycles of all the browsers that are available.

The end result is that sometimes, our .Net application render differently in some browsers, even if they shouldn’t, and, even worst, some functionalities may not work.
To overcome this problem, .Net has a property that allows to specify what to do with the distinct HTTP agents.
Using the ClientTarget property from the Page class, developers can, for instance, assume everyone is using, at least FireFox 3 or Internet Explorer 7.

In short, the solution is to force all “old” browsers to behave as a certain browser and code it from there. This can be achieved either through the clientTarget options in the web.config application file, setting this property to the entire application, or specifically on a page as an attribute of the Page directive.