• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1312
  • Last Modified:

Writing a "newline" in "text/plain". asp.net 2.0

I'm writing some asp code that is manually displaying some text on a page withought all the <html><body> tags, etc. I can't figure out how to tell it to go down a line. I need to display it like this:
My Name
Address
Phone number
Not like this:
My NameAddressPhone number
HTML tags cannot be used here since I need the source html code to contain nothing but the raw data text (no tags). thanks, Chris.
0
jumpstart0321
Asked:
jumpstart0321
1 Solution
 
Jaime OlivaresCommented:
use "\r\n" combination instead of "<br>" or "<p>"
0
 
SteveH_UKCommented:
Note that \r\n is correct for Windows encodings, but \n is correct for Unix (i.e. Linux and Mac) encodings.  It matters what encoding you use in the HTTP headers, not just text/plain.

\r is the Carriage Return character and has a hex code of 0D
\n is the New Line character and has a hex code of 0A

Both have the same codes in UTF-8, and are one byte long.
0
 
b0lsc0ttCommented:
jumpstart0321,

This is done with vbcrlf.  It is a constant in ASP (vbscript) that will insert a carriage return character and a line feed character.

Let me know if you have any questions or need more information.

b0lsc0tt
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
b0lsc0ttCommented:
jumpstart0321,

In other languages (e.g. PHP, Javascript, etc) the method is \r\n or just \n in the script.

Let me know if you have a question.

b0lsc0tt
0
 
jumpstart0321Author Commented:
GREAT JOB!!!:)
0
 
b0lsc0ttCommented:
I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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