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!

carriage return???

Status
Not open for further replies.

Grazer

Programmer
Sep 6, 2001
28
0
0
GB
Does anyone know how to add a carriage return to a string in an asp page using vbscript??

thanks for any answers.
 
You can do this easily in VBSCript using "vbcrlf". This stands for "Visual Basic Carriage Return Line Feed":

I use this a lot when writing scripts that actually write out other scripts.

For example, using vbcrlf in the middle of a string as such:

<%
Headlines.Write(&quot;<!--&quot; & vbcrlf)
Headlines.Write(&quot;document.writeln('Hello, World!');&quot;)Headlines.Write(vbcrlf)
Headlines.Write(&quot;//-->&quot;)
Headlines.Close
%>

...prints out the following output:

<!--
Hello world!
//-->

Hope this helps,
Jason
 
Sorry...that example should have read:

<%
Response.Write(&quot;<!--&quot; & vbcrlf)
Response.Write(&quot;document.writeln('Hello, World!');&quot;)Response.Write(vbcrlf)
Response.Write(&quot;//-->&quot;)
Response.Close
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top