Solved

Newline character within ASP String

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This is a quick article, and by no means should you quit your job today or plan to feed your family of 5 on a business idea. Starting a business takes work. This article will only give you the basic skeleton of understanding. Going into business for…
Originally published Entrepreneur.com Booming numbers of freelancing professionals are changing the face of work. In the United States alone last year, the number of workers freelancing grew from 700,000 to 54 million, according to a Freelancers’…
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…
Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.

821 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