XHTML Strict validation - one of the things that Tsuko insisted during our work on SPT - helped me to discover an interesting behaviour of the ASP.NET with the W3.org validator.
ASP.NET 2 has a built in functionality that affects the way controls are rendered. This can be controlled by inserting a <xhtmlConformance mode="Strict|Transitional|Legacy" /> tag in the web.config - the default is Transitional. However, even though you choose the strict mode, W3.org validation fails. This is caused by the fact that the w3 validator is treated as a lesser browser.
So in order to get the validation working, you need to create a w3cvalidator.browser file in the ~/App_Browsers folder and add the following content to the file
<browsers>
<!--
Browser capability file for the w3c validator
sample UA: "W3C_Validator/1.305.2.148 libwww-perl/5.803"
-->
<browser id="w3cValidator" parentID="default">
<identification>
<userAgent match="^W3C_Validator" />
</identification>
<capture>
<userAgent match="^W3C_Validator/(?'version'(?'major'\d+)(?'minor'\.\d+)\w*).*" />
</capture>
<capabilities>
<capability name="browser" value="w3cValidator" />
<capability name="majorversion" value="${major}" />
<capability name="minorversion" value="${minor}" />
<capability name="version" value="${version}" />
<capability name="w3cdomversion" value="1.0" />
<capability name="xml" value="true" />
<capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />
</capabilities>
</browser>
</browsers>
read the whole article at http://idunno.org/archive/2005/01/01/216.aspx