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.>
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",


> 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
Received on Tuesday, 2 June 2009 08:56:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:59 UTC