How do I stop the frmework from producing invalid XHTML for the validator?

A

Alan Silver

Hello,

I have a site that produces 100% valid XHTML 1.0 Strict when viewed in a
browser (IE, Firefox, etc). I just tried validating the site with an
on-line validator, and got several errors.

It seems that the framework is sending the validator down-level code, as
it assumes that the validator is a down-level browser.

Is there any way to stop this? At the moment, anyone checking it (which
is something I encourage my customers to do) thinks that I have written
invalid code.

TIA
 
D

dallaslee

I had to copy and paste the html generated in IE. I know its a pain
but I think its the only solution, unleass we find validator out there
that sends an uplevel browser id.
 
A

Alan Silver

I had to copy and paste the html generated in IE. I know its a pain
but I think its the only solution, unleass we find validator out there
that sends an uplevel browser id.

Unfortunately, that's not my main problem. I can validate the code
produced using a feature on the Internet Explorer Developers Toolbar
(free download from MS) that uploads the current page's (X)HTML and
passes it to a validator.

My real problem is that one of the factors I use in advertising my
services is that I am one of the very few designers who produce 100%
valid HTML. This is a surprisingly strong point that has won me a lot of
business in the past. In classic ASP that was easy as you had total
control over the output. In ASP.NET it's a major pain as the framework
produces quite a lot of invalid XHTML. If a customer (or potential
customer) validates at a site I have written, they will see errors. Even
though the XHTML sent to a browser is valid, the code sent to the
validator is not. The customer doesn't know that, and assumes that my
code is not valid. Bang goes my selling point.

So, I need a way of getting around this, otherwise I'm stuck. Thanks for
the reply.
 
S

Stan

Hi Allan,

You could try to add <xHtmlConformance mode="Strict" /> to your
Web.config. Check this:

http://windowssdk.msdn.microsoft.co...html/773eeeeb-2df0-46f2-85b7-d3d198eaa08a.asp

Greetz,

Doogie.

Alan Silver schreef:
I had to copy and paste the html generated in IE. I know its a pain
but I think its the only solution, unleass we find validator out there
that sends an uplevel browser id.

Unfortunately, that's not my main problem. I can validate the code
produced using a feature on the Internet Explorer Developers Toolbar
(free download from MS) that uploads the current page's (X)HTML and
passes it to a validator.

My real problem is that one of the factors I use in advertising my
services is that I am one of the very few designers who produce 100%
valid HTML. This is a surprisingly strong point that has won me a lot of
business in the past. In classic ASP that was easy as you had total
control over the output. In ASP.NET it's a major pain as the framework
produces quite a lot of invalid XHTML. If a customer (or potential
customer) validates at a site I have written, they will see errors. Even
though the XHTML sent to a browser is valid, the code sent to the
validator is not. The customer doesn't know that, and assumes that my
code is not valid. Bang goes my selling point.

So, I need a way of getting around this, otherwise I'm stuck. Thanks for
the reply.
 
D

Damien

Alan said:
Unfortunately, that's not my main problem. I can validate the code
produced using a feature on the Internet Explorer Developers Toolbar
(free download from MS) that uploads the current page's (X)HTML and
passes it to a validator.

My real problem is that one of the factors I use in advertising my
services is that I am one of the very few designers who produce 100%
valid HTML. This is a surprisingly strong point that has won me a lot of
business in the past. In classic ASP that was easy as you had total
control over the output. In ASP.NET it's a major pain as the framework
produces quite a lot of invalid XHTML. If a customer (or potential
customer) validates at a site I have written, they will see errors. Even
though the XHTML sent to a browser is valid, the code sent to the
validator is not. The customer doesn't know that, and assumes that my
code is not valid. Bang goes my selling point.

So, I need a way of getting around this, otherwise I'm stuck. Thanks for
the reply.
If this is for a button saying "Validate Me" or something similar, that
links to one Validator site, then you could examine the User-Agent
string that comes from that validation site and then add an entry for
it in browserCaps that sets the same settings as (for example) IE6.
Then the framework should serve identical code.

On the other hand, if it could be one of many validation sites, then
you either have to do it for each one, or resign yourself to it not
happening.

Damien
 

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

Members online

Forum statistics

Threads
473,779
Messages
2,569,606
Members
45,239
Latest member
Alex Young

Latest Threads

Top