I am trying to get my page validated on the W3C's "Markup Validation
Service" ( http://www.yqcomputer.com/
) but I am having a problem with the
HTML generated by the button control.
<asp:button id="btnSubmit" runat="server" Text="Submit
<input type="submit" name="btnSubmit" value="Submit Form" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
for the <input> tag in HTML 4.01.
I have tried removing it in my code behind page using
btnSubmit.Attributes.Remove("lanaguage"), but language does not appear
as part of the AttributeCollection.
Sven Groot had exactly the same problem back in 2002 ("Removing
non-standards-compliant attribute from rendered HTML") but no-one
posted a reply to his problem.
Is there any way of removing/excluding attributes that are
automatically generated by asp.net?
Is anyone else having difficulties getting their ASPX pages validated
to the W3C standards?