ASP.NET generating invalid markup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

ASP.NET generates markup that fails WC3 validation in a number of situations
(below): can anyone suggest a way round these?

1. For Command Buttons, the HTML <INPUT type = Image> element rendered has a
border=0 attribute. This needs to be rendered as a style attribute to pass
validation.

2. Also for Command Buttons, when there is a validation control on the page,
the javascript that is rendered for the button doesn't have a
"type=text/javascript" attribute and this fails validation.

Are these behaviours hard-coded into the web controls, or can they be
configured somehow? Is there any other way round it?
 
Just out of curiosity I'm wondering why you even care that the application
generates valid output? To what end? Does the output need to be consumed as
XML? If not, W3C validation seems superfluous.

<%= Clinton Gallagher
 
Perhaps he's worried about his search engine bots ?

--
Best Regards

The Inimitable Mr Newbie º¿º


clintonG said:
Just out of curiosity I'm wondering why you even care that the application
generates valid output? To what end? Does the output need to be consumed
as XML? If not, W3C validation seems superfluous.

<%= Clinton Gallagher
 
I've never known anything about search engines requiring valid XHTML.
AFIK validation is only relevant when the output of an application is
required for reuse as input or as data for some other XML parser.

<%= Clinton Gallagher

Mr Newbie said:
Perhaps he's worried about his search engine bots ?
 
The reason is that the W3C HTML standard is the lowest common denominator
browser implementation. If you want pages that work well on browsers other
than just IE, your markup needs to validate. For commercial web products,
customers look for the W3C valid credential as a sign of quality.

--
Paul Taylor
Dotcom Software Solutions
www.dotcomsoftwaresolutions.co.uk


clintonG said:
Just out of curiosity I'm wondering why you even care that the application
generates valid output? To what end? Does the output need to be consumed as
XML? If not, W3C validation seems superfluous.

<%= Clinton Gallagher
 
Back
Top