Home All Groups Group Topic Archive Search About

Display text with <newline> characters...

Author
21 Jun 2006 10:58 PM
TTT
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

Author
23 Jun 2006 12:14 AM
Nathan Sokalski
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
njsokal***@hotmail.com
http://www.nathansokalski.com/

Show quoteHide quote
"TTT" <hieu.protectspam@laposte.net> wrote in message
news:4499ce8a$0$16569$636a55ce@news.free.fr...
> 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
>