Click to See Complete Forum and Search --> : Asp files validations - problems
ozpo1
01-23-2006, 09:10 PM
I'm trying to validate my files, but I don't know what to do with my asp files.
I'm validating the files on the w3c site and I have several questions:
1. Is it possible to validate my asp files in an html validators. (I want to validate the html code in the asp file)
2. What should I write in the doctype command, a html file or asp file??
3. Where can I find a validator that validate asp code too, correct me if I wrong, but I think the w3c are not offering an asp validator.
Thanks in advanced, Oz.
You need to sort out your knowledge of server-side vs. client side.
asp does not have a doctype, asp serves pages.
What you need to do to validate is to publish the asp page on a server that is accessible to the internet, then, submit that location to the W3c validator so that the w3c validator can validate your HTML. asp has nothing to do with this.
If you have a lot of HTML that is enclosed in IF, SELECT, WHILE statements, you will have to validate each possibility in order to get it completely correct. You can do this by adding something like '1=1' to your if statement to dump out the HTML you want to validate.
Bullschmidt
01-29-2006, 05:46 PM
One nice thing about VBScript code is that if there are no errors then it's basically OK. But of course there are some coding guidelines such as commenting to make VBScript better.
And here is an example of an ASP page with comments:
http://www.asp101.com/samples/viewasp.asp?file=db%5Fpaging%2Easp
Variables, Naming, Scope and You, Oh My! by Brian Bilbro
http://www.aspalliance.com/bbilbro/articles/ASPSE/Naming.asp
And often when one mentions validation it is regarding the data entry:
Server-Side Form Validation by Dianna Leech
http://www.4guysfromrolla.com/webtech/120199-1.shtml
An Email Validation Routine by Joćo Vieira
http://www.4guysfromrolla.com/webtech/041199-1.shtml
Somewhat shorter.
An Email Validation Script by Ben Durbin
http://www.4guysfromrolla.com/webtech/051999-1.shtml
Longer.
ozpo1
01-30-2006, 06:35 PM
I appreciate your time. :)