Solved

Newline character within ASP String

Posted on 2004-04-08
3
531 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
searching on website for specific words/phrases 9 72
Best Graph 2 41
Web Browsers Start Page Hijacker 14 76
Not needed 13 57
Stuck in voice control mode on your Amazon Firestick?  Here is how to turn it off!!!
Whether you believe the “gig economy,” as it has been dubbed, is the next big economic paradigm shift (https://www.theguardian.com/commentisfree/2015/jul/26/will-we-get-by-gig-economy) or an overstated trend (http://www.wsj.com/articles/proof-of-a-g…
Notifications on Experts Exchange help you keep track of your activity and updates in one place. Watch this video to learn how to use them on the site to quickly access the content that matters to you.
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now