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.

Visual Studio C# Express in x86 32 bit

Visual Studio Express edition is a striped down version of the professional version. Thus, some features are not directly, or easily, available.
One of these features is to run in 32 bit on a 64 bit computer.
To make it work, all one has to do is define the target platform as x86:

  1. Close the C# project.
  2. Open the C# Project file, .csproj, with a plain text editor, such as Notepad.
  3. Make shure that the following entry is present in all three sections of PropertyGroup:

Here’s a snippet:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="">
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>


After performing a rebuild, the application will be built in 32 bit.