Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Newline character within ASP String

Posted on 2004-04-08
3
536 Views
Last Modified: 2008-02-01
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
Comment
Question by:Shelmina_Shivji
  • 2
3 Comments
 
LVL 11

Expert Comment

by:griessh
ID: 10786130
Hi Shelmina_Shivji,

something like:

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




======
Werner
0
 
LVL 1

Expert Comment

by:stephenmmitchell
ID: 10786535
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
 
LVL 1

Accepted Solution

by:
stephenmmitchell earned 50 total points
ID: 10786547
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

EE introduced a new rating method known as Level, which displays in your avatar as LVL. The new Level is a numeric ranking that is based on your Points. This article discusses the rationale behind the new method and provides the mathematical formula…
This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
Articles on a wide range of technology and professional topics are available on Experts Exchange. These resources are written by members, for members, and can be written about any topic you feel passionate about. Learn how to best write an article t…
Saved searches can save you time by quickly referencing commonly searched terms on any topic. Whether you are looking for questions you can answer or hoping to learn about a specific issue, a saved search can help you get the most out of your time o…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question