Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing Page w/ASP

Status
Not open for further replies.

Skie

Programmer
Jun 21, 2004
475
US
How should I be formating my data (HTML? XML?) for pages built w/ASP? I'm using a query on a database to pull data, then writing 90% of the page. About the only thing I don't use a response.write for is informatino in the head tag.

I'm currently using HTML, and it works for me. It's a bit cumbersome though since it's generating a form. I intially functioned out the input tags so that it'd write a label to go with the tag, but anytime I decide to add another property, I have to rewrite the asp to work with this. This is why I was wondering if xml would make it easier? Then it only comes down to me telling it write this data to this tag. Then, for this tag translate it to this HTML.

Or maybe there's a better method I don't know or haven't thought about.
 
Formatting is for readability by humans. If I ever have to read the final HTML output to track down an error, then I format it for that. Otherwise, I don't bother to format areas of pages built dynamically from data.

Lee
 
Mmmm... I usually try to format my code, even if it is being built dynamically.

I have some code which runs in ASP, and makes dynamic Javascript to fill forms, verify information, etc.... so, server side ASP creating client side Javascript. It works well, however, I need to remember to include some VbCrLf's in there so the dynamic code is still formatted for readability.

Nothing worse than saying "OK, why isn't this working?" then doing a view --> Source, only to have everything munged together so it takes me even LONGER to find the problem.

A few extra keystrokes, and my code stays formatted.

It's also nice to indent loops, etc. for readability.



Just my 2¢
-Cole's Law: Shredded cabbage

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top