Are there any good methods for getting ASP.NET 2.0 to validate under the XHTML 1.0 Strict (or Transitional) DTD? I'm interested to hear some ideas before I hack up the core of the HTTP response.
One major problem is the form tag itself, this is the output I got from W3C when I tried to validate:
Line 13, Column 11: there is no attribute "name".
<form name="aspnetForm" method="post" action="Default.aspx" onsubmit="javascript
That tag is very fundamental to ASP.NET, as you all know. Hmmmm.
ASP.NET 2.0 and above can indeed output Strict (or Transitional) XHTML. This will resolve your 'there is no attribute "name"' validation error, amongst other things. To set this up, update your Web.config file with something like:
<system.web>
... other configuration goes here ...
<xhtmlConformance mode="Strict" />
</system.web>
For Transitional XHTML, use mode="Transitional"
instead.
See How to: Configure XHTML Rendering in ASP.NET Web Sites on MSDN.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With