Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Labels and Carriage Returns

Status
Not open for further replies.

gi11ies

Programmer
Mar 26, 2002
52
Hi

I have a multiline text box that I paste text/paragraphs from a word doc into - and save to an Access database in a memo field.

Problem is when I try to display the content from the memo field on a page using an ASP:Label it shows it all without the carriage returns.

for example in the label on the page its all joined together, I get

1 2 3 4 5

instead of

1
2
3
4
5

Any tips on how to overcome this?

Gillies
 
I got this sorted:

lblText.text = Replace(myString, vbCrLf, "<br />")

is the solution to my problem.
 
You may also want to consider the white-space CSS attribute. Setting it to "pre" acts like the old style html tag with the same name.

________________________________________
Andrew

I work for a gift card company!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top