
September 8th, 2003
10:14 AM
write asp code to text file
Im trying to write a form validation program and I need the compiled html/asp to be written to a text file - the only problem is, If i do this it will try and execute the asp. Any ideas would be a great help.
The only way I cant think of at the moment is to encrypt the asp tags etc and write to file.
Please help 
___________________
Please checkout my folio sites at Factory4.co.uk and z1ppy.deviantart.com

September 8th, 2003
07:45 PM
Neverside Newbie
Status: Offline!
Hi Z1ppy,
You gotta escape the special characters. Im not exactly sure how to do this in asp, in php you use the function htmlspecialchars() on your string to stop the code getting interpreted and run.
You could read up about the escape() funtion in asp, but Im not totally sure what that does.
Another way would be to use regular expressions, and swap all the '<' with '<' and all the '>' with '>', then you need to look at other special characters such as the quotation and inverse-comma characters, etc.
Hope this points you in a better direction.
Regards,
Mike.
___________________
Professional Geek