Fog Creek Software
Discussion Board




ASP.Net validator?

Anyone know of a validator (online or download) that will validate aspx files with inline scripting? (I'm not looking for syntax checking, just something that will match up tr's and td's and quotes and highlight ones that are missing or mismatched)

Philo

Philo
Thursday, January 15, 2004

I thought those HTML validators ignored inline scripting tags.

Matthew Lock
Thursday, January 15, 2004

How do you validate HTML when a </td> only turns up IF such and such a condition is true?

www.MarkTAW.com
Thursday, January 15, 2004

I guess you would have to run the script then and validate it's output.

Matthew Lock
Thursday, January 15, 2004

Hence the comment on IF, I imagine.

You could use any HTML validator if you're prepared to generate test cases for each possible state of the page.

Or if you could get sourcecode for a validator, you could alter it to treat <% (or what have you) as comments...

Mediocre ASP Monkey
Thursday, January 15, 2004

yeah, I'm not generating HTML from the code, but it's asp.net, which has asp.net-specific tags, like
<asp:Repeater ID="ProgramRepeater" Runat="server">

Which have to be formatted and nested correctly.

And the code tags mean I can't use an xml validator...

Hmmm... might just have to write something...

Philo

Philo
Friday, January 16, 2004

use your resources, internal msft mailing list?


Friday, January 16, 2004

I am, but I was also interested in what's publically available. On stuff like this I think it's important to know what's going on on both sides of the fence.

Philo

Philo
Friday, January 16, 2004

I think it's probably impossible.  ASP.net produces an HTML page at runtime:  that's what it sends to the browser.  I have been trying to validate that output with no success.  I use File->Save to save the page as page.htm and then point the w3c validator to the file, but that gives errors where none should be.  First the validator said that a LINK tag was not allow, but it pointed to the -slash greater than- tag that asp.net creates.  So I got rid of the slash to close the tag.  Then the validator didn't like the javascript that asp.net creates on the fly.  I guess it didn't comment it out well enough.  Anyway, I give up.

Rodney Broder
Friday, January 23, 2004

*  Recent Topics

*  Fog Creek Home