Re: Question regarding W3C validator and ASP.NET

I never stated that what I posted was valid, I was merely trying to
illustrate the differences in the rendered markup that the same .aspx
template can generate given 3 possible configuration settings.  Let me
put it another way; the asp.net XML configuration file can have 3
possible settings

<xhtmlConformance mode="Legacy"/>

<xhtmlConformance mode="Transitional"/> 
<xhtmlConformance mode="Strict"/>
 
The rendered markup for each of these settings, respectively (with
'input' errors now corrected), is:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><meta http-equiv="Content-type"
content="text/html;charset=UTF-8"><title>
        Untitled Page
</title></head>
<body>
    <form name="form1" method="post" action="default.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJMTQ5ODEyODUyZGQ=" />
 
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="/wEWAwL7z8SCCAKsyrLrBgKs34rGBg==" />
    <p><input name="textbox1" type="text" id="textbox1" /></p>
    <p><input type="submit" name="button1" value="" id="button1" /></p>
    </form>
</body>
</html>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><meta http-equiv="Content-type" content="text/html;charset=UTF-8"
/><title>
        Untitled Page
</title></head>
<body>
    <form name="form1" method="post" action="default.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJMTQ5ODEyODUyZGQ=" />
</div>
 
<div>
 
        <input type="hidden" name="__EVENTVALIDATION"
id="__EVENTVALIDATION" value="/wEWAwL7z8SCCAKsyrLrBgKs34rGBg==" />
</div>
    <p><input name="textbox1" type="text" id="textbox1" /></p>
    <p><input type="submit" name="button1" value="" id="button1" /></p>
    </form>
</body>
</html>
 
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><meta http-equiv="Content-type" content="text/html;charset=UTF-8"
/><title>
        Untitled Page
</title></head>
<body>
    <form method="post" action="default.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJMTQ5ODEyODUyZGQ=" />
</div>
 
<div>
 
        <input type="hidden" name="__EVENTVALIDATION"
id="__EVENTVALIDATION" value="/wEWAwL7z8SCCAKsyrLrBgKs34rGBg==" />
</div>
    <p><input name="textbox1" type="text" id="textbox1" /></p>
    <p><input type="submit" name="button1" value="" id="button1" /></p>
    </form>
</body>
</html>
 
 
So then, leaving aside semantics and pedantics, is anyone actually able
to answer my question... why does wrapping the input in a div mean that
the W3C validator ignores the id underscore rule?

 

 

Matt Salmon
Head of Programming 

 

Liverpool Science Park
131 Mount Pleasant
Liverpool L3 5TF 

t: +44 (0) 845 365 4040
f: +44 (0) 845 365 4041
w: www.mandogroup.com <http://www.mandogroup.com/>  

Mando Group Ltd
Registered in England 04391789 

 

________________________________

The contents of this email are strictly private and confidential and are
intended solely for the named addressee[s] only. If you are not the
intended recipient, you should not copy it or use it for any purpose,
nor disclose its contents to any other person and you should return this
message to the sender and delete it from your mailbox. The views and
opinions expressed in this email do not necessarily represent those of
Mando Group. Please note that whilst Mando Group does check for viruses,
it is the responsibility of the recipient to scan all messages prior to
opening them. 

________________________________

 

Received on Tuesday, 2 June 2009 11:56:03 UTC