Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 15th, 2004, 06:01 PM
Authorized User
 
Join Date: Mar 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default HTML formating

how to you make response.write statements write the contents as you would see is HTML.... so not just in one long row

 
Old August 15th, 2004, 06:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

If I understood your question right, use variables.
Code:
<%
Dim strHTML

strHtml = "<html>"
strHtml = strHTML & "<Head>"
strHtml = strHTML & "<Title>My Title</Titlel>"
strHtml = strHTML & "</Head>"
strHtml = strHTML & "<Body>"
strHtml = strHTML & "This is my formatted text."
strHtml = strHTML & "</Body>"
strHtml = strHTML & "</html>"

Response.Write strHTML
%>
OR
Code:
<%
Response.write "<html>"
Response.write "<Head>"
Response.write "<Title>My Title</Titlel>"
Response.write "</Head>"
Response.write "<Body>"
Response.write "This is my formatted text."
Response.write "</Body>"
Response.write "</html>"
%>
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old August 15th, 2004, 06:21 PM
Authorized User
 
Join Date: Mar 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default

sorry... i dont think i explained it well enough... for example what you typed looks like this:

Code:
<html><Head><Title>My Title</Titlel></Head><Body>This is my formatted text.</Body></html>
when you view the source

i would like it to look like this:
Code:
<html>
<Head>
<Title>My Title</Titlel></Head>
<Body>
This is my formatted text.
</Body>
</html>
 
Old August 15th, 2004, 06:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

But you never explained about how it should look with a VIEW SOURCE, in the previous post. May I know what is this for? May be if you explain more on that, it would be of better help than going by assumptions.

_________________________
- Vijay G
Strive for Perfection
 
Old August 15th, 2004, 06:42 PM
Authorized User
 
Join Date: Mar 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default

This is really for nothing that is really important. I just want the user to be able to view the source, through Internet explorer or something like that, of my website and have a nice clean source code. Not just something that is all bunched up..

 
Old August 15th, 2004, 06:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

May be this helps. Try this.
Code:
Response.write "<html>" & VbCrLf
Response.write "<Head>" & VbCrLf
...
Use VbCrLf, wherever you want to break the line to next.

Cheers!
_________________________
- Vijay G
Strive for Perfection
 
Old August 15th, 2004, 08:28 PM
Authorized User
 
Join Date: Mar 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default

yep that is waht i was looking for! thanks!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Drill down formating FAP BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 May 22nd, 2006 11:00 AM
Formating text bjackman Access VBA 1 August 22nd, 2005 03:04 AM
Number formating kondapally Crystal Reports 1 January 3rd, 2005 11:07 AM
DataGridTextBoxColumn Formating melvik C# 1 June 1st, 2004 03:28 PM
formating numbers renee_santoscoi Visual C++ 0 December 8th, 2003 06:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.