Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 543
  • Last Modified:

Newline character within ASP String

How do i add a Newline between two strings

x="Hi"
y="Heehee"

response.write "x" & "y"
output: hiheehee

but what i want is
hi
heehee

Please advice. Thanks for your help.

0
Shelmina_Shivji
Asked:
Shelmina_Shivji
  • 2
1 Solution
 
griesshCommented:
Hi Shelmina_Shivji,

something like:

var newline
newline="\n"
response.write "x"+newline+"y"




======
Werner
0
 
stephenmmitchellCommented:
You need this:

x="Hi"
y="Heehee"

response.write "x" & vbCrLf & "y"

output:
Hi
Heehee

The "vbCrLf" is built into VBScript for a line break.

Hope this helps
0
 
stephenmmitchellCommented:
However, if you are trying to output this to HTML, you will need to do something like this.

x="Hi"
y="Heehee"

response.write "x" & "<br>" & "y"

output (in HTML):
Hi
Heehee

I think the first answer is what you are looking for though.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now