fordie’s blog

25 Oct, 2007

Quick tip for using XHTML Strict with ASP.net

Posted by: Mark In: .net| annoyances| web development| xhtml

One thing that has always infuriated me with .net is it’s insistence on adding an invalid name attribute to the asp.net form*.

About a month ago I found a nice easy cure for this, so I thought I’d share it. All you need to do to stop .net adding the name attribute to the form is add an xhtmlConformance tag to your web.config like so:

<configuration>
<system.web>
<xhtmlConformance mode=”Strict” />
</system.web>
</configuration>

Hopefully that’ll be of some use to someone.

*What annoys me more is the fact you have to have a form tag on every page for .net to work, but that’s a rant for another day.

Blogged with Flock

No Responses to "Quick tip for using XHTML Strict with ASP.net"

Comment Form