Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-15-2002, 09:03 PM   PM User | #1
tr0n2ooo
New to the CF scene

 
Join Date: Jul 2002
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
tr0n2ooo is an unknown quantity at this point
Question Writing entire pages with Response.Write

Hi, I was wondering how to write large responses, like an entire web page. The quotes can get kind of tricky. Any help would be appreciated.
tr0n2ooo is offline   Reply With Quote
Old 07-15-2002, 09:14 PM   PM User | #2
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
How about something like:

Code:
<%
your ASP code

%>

<HTML>
<HEAD>
<TITLE><%=VarPageTitle%></TITLE>
</HEAD>

<BODY>
<p>
<%=Text%>
</p>
</BODY>
</HTML>
Hopefully you get it. You can mix HTML in with your ASP coding. So like you set a variable with the page's title and then you just insert that variable into your HTML.
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 07-16-2002, 07:43 PM   PM User | #3
Morgoth
Senior Coder

 
Morgoth's Avatar
 
Join Date: Jun 2002
Location: Ontario, Canada Remaining Brain Cells: 6
Posts: 1,402
Thanks: 2
Thanked 1 Time in 1 Post
Morgoth is an unknown quantity at this point
Now, if you want all the code to be with response.write then just:

Response.Write "<HTML>"
Response.Write "<HEAD>"
Response.Write "<TITLE>"
Response.Write "HELLO WORLD"
Response.Write "</TITLE>"
Response.Write "</HEAD>"
Response.Write "<BODY>"
Response.Write "<FONT SIZE=7>"
Response.Write "HELLO WORLD"
Response.Write "</FONT>"
Response.Write "</BODY>"
Response.Write "</HTML>"


Or even:

Response.Write "<HTML>" & vbcrlf & "<HEAD>" & vbcrlf & "<TITLE>" & vbcrlf & "HELLO WORLD" & vbcrlf & "</TITLE>" & vbcrlf & "</HEAD>" & vbcrlf & "<BODY>" & vbcrlf & "<FONT SIZE=7>" & vbcrlf & "HELLO WORLD" & vbcrlf & "</FONT>" & vbcrlf & "</BODY>" & vbcrlf & "</HTML>"

Same result of:

<HTML>
<HEAD>
<TITLE>
HELLO WORLD
</TITLE>
</HEAD>
<BODY>
<FONT SIZE=7>
HELLO WORLD
</FONT>
</BODY>
</HTML>
Morgoth is offline   Reply With Quote
Old 07-17-2002, 02:03 AM   PM User | #4
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
With Response
.Write("stuff" & vbcrlf)
.Write("some more stuff")
End With

Is another way...

I personally like the first idea though
__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Old 07-17-2002, 02:05 AM   PM User | #5
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
By the way, the quotes aren't really tricky at all (although they seem that way at first!)... you just have to escape a quote with another quote... like:

Response.Write("<a href=""blah.asp"">Link</a>")

Get it?

__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:43 AM.


Advertisement
Log in to turn off these ads.