Hey All, I have been searching for a way to insert linebreaks in my code for when I view my source. I am not looking for
Something like the PHP equiv to \n
Any ideas on how to do this in ASP? I will be placing this in side a string.
Thanks,
Ryan
Hey All, I have been searching for a way to insert linebreaks in my code for when I view my source. I am not looking for
Something like the PHP equiv to \n
Any ideas on how to do this in ASP? I will be placing this in side a string.
Thanks,
Ryan
There's no way to do it inside a string. You will have to append vbCrLf like so:
Response.Write "hello" & vbCrLf & "world"
If you want to include it in the string, you could do a replace after like so:
output = "hello\nworld"
output = Replace(output, "\n", vbCrLf)
Response.Write output
In addition to the \n
method, I have also embedded the HTML tag <BR>
and used:
Response.Write "First Line Of Text<br>Second Line Of Text<br>Third line Of Text"