J
j.madgwick
I'm confused. I've been trawling the web and can't find the
answer...
The background: I am working on a MCMS site with ASPNET 1.1.4322. We
want the site to be written in standard compliant HTML that passes the
W3C validator.
The problem: ASPNET controls are generating HTML with xHTML
self-closing tags. Eg. <img id="Image1" alt="" border="0" /> and <input
type="hidden" name="__EVENTTARGET" value="" />
A solution: I have read that you can use <xhtmlConformance
mode="Legacy" /> in your web.config to control the type of HTML
generated by an ASPNET control, but this is a feature of ASPNET 2.0, we
are using 1.1.
The confusion: From what I have read on the web, ASPNET 1.1 does *not*
produce any xHTML code. Every article is about getting xHTML not
getting rid of it! So, where are the closing tags coming from? Could
it be part of a Service Pack or other windows/accessibility upgrade? I
mention accessibility because I've noticed that it also puts a empty
alt attribute into my img tags automatically too.
Any information would be appreciated.
Thanks,
John.
answer...
The background: I am working on a MCMS site with ASPNET 1.1.4322. We
want the site to be written in standard compliant HTML that passes the
W3C validator.
The problem: ASPNET controls are generating HTML with xHTML
self-closing tags. Eg. <img id="Image1" alt="" border="0" /> and <input
type="hidden" name="__EVENTTARGET" value="" />
A solution: I have read that you can use <xhtmlConformance
mode="Legacy" /> in your web.config to control the type of HTML
generated by an ASPNET control, but this is a feature of ASPNET 2.0, we
are using 1.1.
The confusion: From what I have read on the web, ASPNET 1.1 does *not*
produce any xHTML code. Every article is about getting xHTML not
getting rid of it! So, where are the closing tags coming from? Could
it be part of a Service Pack or other windows/accessibility upgrade? I
mention accessibility because I've noticed that it also puts a empty
alt attribute into my img tags automatically too.
Any information would be appreciated.
Thanks,
John.