I recently had to make some upgrades to an application that was built using the .NET 1.1 framework. Just to add a bit of background to this post, I am currently using Visual Studio 2008 on my laptop and was able to successfully perform a migration of the solution from .NET 1.1 to 2.0.

When I attempted to test my ASP.NET validators, I realized that they were not working properly in Firefox. By properply, I mean, they weren’t firing at all. I did a bit of research and found that back in the .NET 1.1 days, the javascript that the validators outputted used a proprietary document.all() syntax which was not understood by non-IE browsers. The supported syntax is document.getElementByID().

In .NET 2.0, this was apparently fixed. However, even though I had converted my project successfully, I still couldn’t get the validators to fire. I did a small test where I created a new .NET 2.0 application, added some validators, and ran the application in Firefox and I found that the validators did work. So it had to be a setting in my project that was not modified during conversion.

Turns out, within my web.config, I had to change the following line of code from:

1
<xhtmlConformance mode="Legacy"/></system.web>

to

1
<xhtmlConformance mode="Transitional"/></system.web>

That resolved my issue.

« »