I recently spent a considerable amount of time converting a client site from not following any particular standard to using the XHTML 1.0 Transitional standard. This was a difficult task since the site was created with VisualStudio.NET 2003 which doesn’t care much about standards! As a result, I spent most of my time designing pages in Macromedia Dreamweaver MX and doing the code in VS.NET (Can you say, “pain-in-the-butt”?)
In converting this site to XHTML, I learned a lot about CSS and the benefits of separating HTML from styles… so much that I have no real desire to go back to the old sloppy way of coding.
With the release of VisualStudio.NET 2005, one of the great features of this new tool is that it creates XHTML 1.0 Transitional code by default! This doesn’t necessarily mean that I can through Dreamweaver out the window, but at least I can open my HTML and ASPX pages up in VS.NET and know it isn’t going to re-write and mangle my code.
The following article from the Microsoft ASP.NET Developer Center is very helpful in explaining the new features of VS.NET 2005 in regards to web standards:
Building ASP.NET 2.0 Web Sites Using Web Standards
If XHTML Transitional isn't good enough and XHTML Strinct is preferred... no problem! Add the following in your project's web.config file:
Note that in addition to changing the runtime behavior to be strict, you can also then change the validation drop-down in the VS toolbar to validate html/javascript against XHTML strict as well.