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

Re: Question regarding W3C validator and ASP.NET

From: David Dorward <david@dorward.me.uk>
Date: Tue, 2 Jun 2009 09:55:49 +0100 (BST)
Message-ID: <61549.132.185.144.120.1243932949.squirrel@malt.us-lot.org>
To: "Matt Salmon" <matt.salmon@mandogroup.com>
Cc: www-validator@w3.org
<quote who="Matt Salmon">

> Basically, ASP.NET 2.0 can enhance the way pages are rendered in order
> to conform with xhtml 1.0 strict, using a configuration setting. This
> has the effect of removing the 'name' attribute from the form element,
> wrapping the hidden asp.net fields in a 'div' element and some other
> changes.

Only Microsoft would describe a bug fix as an "enhancement".

> The issue with the hidden fields is that the ID's start with an
> underscore character e.g "__VIEWSTATE",

Correct

> however what I can't understand
> is how wrapping the fields in an outer 'div' results in a 'pass' from
> the validation service?

The child element of a form must be an element in the group %block (other
than form). Inputs are not in that group, div elements are. Div elements
are allowed to contain inputs.

Starting an id with an underscore is a seperate issue. The setting may or
may not fix that.

Note that a control _name_ MAY start with an underscore, and there is
usually no reason to give a hidden input an id, so it is possible you are
just confusing names and ids here.

Seeing the difference in the code outputted in the two modes might help us
shed more light on the matter.

(Please direct responses to the www-validator mailing list and not
directly to me).

-- 
David Dorward
http://dorward.me.uk/
Received on Tuesday, 2 June 2009 08:56:29 GMT

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