J
John Madgwick
Hi,
I am trying to get my page validated on the W3C's "Markup Validation
Service" (http://validator.w3.org) but I am having a problem with the
HTML generated by the button control.
ASPX code:
<asp:button id="btnSubmit" runat="server" Text="Submit
Form"></asp:button>
Rendered HTML:
<input type="submit" name="btnSubmit" value="Submit Form" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="btnSubmit" />
The problem is that lanaguage="javascript" is not a valid attribute
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?
Cheers,
John.
I am trying to get my page validated on the W3C's "Markup Validation
Service" (http://validator.w3.org) but I am having a problem with the
HTML generated by the button control.
ASPX code:
<asp:button id="btnSubmit" runat="server" Text="Submit
Form"></asp:button>
Rendered HTML:
<input type="submit" name="btnSubmit" value="Submit Form" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="btnSubmit" />
The problem is that lanaguage="javascript" is not a valid attribute
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?
Cheers,
John.