If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > writing HTML

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-08-04, 21:05
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
writing HTML

How do you write HTML using Response.Write so the HTML tags are recognized? Is there a tutorial on the basic method to do this?

For example, if I want to just generate an HTML page in its basic structure:

<html>
<head>
<title>My Title</title>
</head>

<body>
<div id="container">
<div id="tophdr"></div>
<div id="main"></div>
<div id="footer"></div>
</div>
</body>
</html>

I'm just trying to get a starting point on how to write HTML output using ASP. Thanks for any help.
-Dman100-
Reply With Quote
  #2 (permalink)  
Old 11-09-04, 09:44
DMWCincy DMWCincy is offline
Registered User
 
Join Date: May 2004
Posts: 125
I'm not sure if I'm understanding what you mean by recognized. Once the parser on the server is done with your asp code and sends it to the browser its sent as plain text. As long as you set up your response.write statements properly the browser will parse them like any other html tags.

Using your example:

response.write "<html>"
response.write "<head>"
response.write "<title>My Title</title>"
response.write "</head>"

response.write "<body>"
response.write "<div id=""container"">"
response.write "<div id=""tophdr""></div>"
response.write "<div id=""main""></div>"
response.write "<div id=""footer""></div>"
response.write "</div>"
response.write "</body>"
response.write "</html>"


If you want your html to be readable you can put in & "<BR>" Also note since some of your html tags has a double quote so I had to use two double quotes<""> so that the parser will print out one double quote to the screen.

HTH.

DMW
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On