in message
: Adrienne wrote:
: > Gazing into my crystal ball I observed "mailbox"
: > <
[email protected]> writing in
: > : >
: >> Did write it down once, but have forgotten !!
: >>
: >> How is it you should format your ASP code to that when viewing the
: >> resulting HTML text from the browsers "view code" it looks nice with
: >> line breaks?
: >>
: >>
: >>
: >
: > You can escape from ASP eg:
: > <% 'your asp code here%>
: > <p>This is the result of <%=variable%></p>
: > <% 'more code%>
: > <p>This is another result of <%=anothervariable%></p>
:
: It's not the resulting HTML page I'm having problem with. What I would
like
: to implement is that when you after loading the asp page, would like to
view
: the HTML source code that code would be layouted with line breaks
It's vbCrLf. You will only see the line breaks in the source, not displayed
in the browser. That requires <br />.
I use:
sub prt(str)
Response.Write str & vbCrLf
end sub
I use it for generally anything with a tag...
prt "<html>"
prt "<head>"
prt "</head>"
You can use them together as Adrienne showed...
sub lprt(str)
Response.Write str & "<br />" & vbCrLf
end sub
I use it for anything without a tag where I was a line break displayed in
the browser...
lprt "Error: The field cannot be left blank."
You can even use it for a blank line...
lprt ""
sub wprt(str)
Response.Write str
end sub
I use it for when I want to print but not end the line...
prt "<table>"
wprt "<tr><td>" & someVariable & "</td>"
' do some processing...
wprt "<td>" & addAnotherVariable & "</td>"
' do some more processing
prt "<td>" & andAnother & "</td></tr>"
prt "</table>"
sub debug(str)
Response.Write "<span style=""background-color: #efe"">" & str & "<br
/>" & vbCrLf
end sub
This one should be obvious...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp