W3C home > Mailing lists > Public > www-validator@w3.org > June 2009

Re: Question regarding W3C validator and ASP.NET

From: Matt Salmon <matt.salmon@mandogroup.com>
Date: Tue, 2 Jun 2009 10:19:40 +0100
Message-ID: <43A63CC10F7B7A4F8047164FB549B32B028ADF74@application-01.mandogroup.com>
To: <www-validator@w3.org>
Ok, here's some example output given the 3 possible xhtml conformance
modes offered by asp.net

 

<xhtmlConformance mode="Legacy"/>

<body>

    <form name="form1" method="post" action="default.aspx" id="form1">

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJNzgzNDMwNTMzZGSXoVqQ0i3LT5svrbSOWojE+R7IzA==" />

 

    <div>

    

    </div>

    </form>

</body>

 

<xhtmlConformance mode="Transitional"/> 

<body>

    <form name="form1" method="post" action="default.aspx" id="form1">

<div>

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJNzgzNDMwNTMzZGSXoVqQ0i3LT5svrbSOWojE+R7IzA==" />

</div>

 

    <div>

    

    </div>

    </form>

</body>

 

<xhtmlConformance mode="Strict"/>

<body>

    <form method="post" action="default.aspx" id="form1">

<div>

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJNzgzNDMwNTMzZGSXoVqQ0i3LT5svrbSOWojE+R7IzA==" />

</div>

 

    <div>

    

    </div>

    </form>

</body>

 

You'll notice that in both transitional and strict modes, the viewstate
field gets wrapped in a div. Running each of these through the w3c
validator shows that this does in fact solve the validation error
regarding the underscore character in the id attribute, but if the rule
says 'id's can't start with an underscore I don't understand how the
extra div helps; the input id still starts with an underscore!

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. 

________________________________

 




image001.gif
(image/gif attachment: image001.gif)

image002.gif
(image/gif attachment: image002.gif)

Received on Tuesday, 2 June 2009 09:16:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:35 GMT