Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Display text with <newline> characters...

Reply
Thread Tools

Display text with <newline> characters...

 
 
TTT
Guest
Posts: n/a
 
      06-21-2006
Hi

When users write a text in a textarea, they hit [ENTER]. So the text is cut
by <newline> caracters.

When display this text in a LabelText, i must convert these <newline> in
<br>. Is there a control to do that?
Otherwise, what is the best function to parse and convert <newline> tokens
into <br> balise?

Thanks


 
Reply With Quote
 
 
 
 
Nathan Sokalski
Guest
Posts: n/a
 
      06-23-2006
Try using the following:


lblYourLabel.Text.Replace(ControlChars.NewLine, "<br>")


I used this code in some of my pages, and it worked great. Good Luck!
--
Nathan Sokalski

http://www.nathansokalski.com/

"TTT" <> wrote in message
news:4499ce8a$0$16569$...
> Hi
>
> When users write a text in a textarea, they hit [ENTER]. So the text is
> cut by <newline> caracters.
>
> When display this text in a LabelText, i must convert these <newline> in
> <br>. Is there a control to do that?
> Otherwise, what is the best function to parse and convert <newline> tokens
> into <br> balise?
>
> Thanks
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
display text in text box nikou_70@yahoo.com ASP General 1 12-07-2005 05:58 PM
Controlling text in a Text Area or Text leo ASP General 1 12-05-2005 01:13 AM
Double double display display problem problem Tom Accuosti Firefox 3 09-27-2004 10:02 PM
CHtmlView: How to read html text before display, change and give to display changed html code? Marek Kurowski C Programming 1 08-18-2004 06:41 PM
Display text in text box - should be simple, doesn't work Jim Owen ASP .Net 1 07-24-2003 05:37 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57