ASP.NET generating invalid markup

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?
 
C

clintonG

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
 
M

Mr Newbie

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
 
C

clintonG

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 ?
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top