By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,665 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,665 IT Pros & Developers. It's quick & easy.

carrying text with line breaks in querystring

P: n/a
Dear ASP.NET Programmers,

I am carrying the input of a textbox via querystring. When I put the value
of querstring in a label control, the line breaks are removed. The whole
text is displayed as a single line. How can I carry the text as it is
entered? Thanks in advance,

Burak
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,
The label control ignores line-breaks while rendering its text. To retain
line breaks in rendering, replace line-break chars with <br> and assign the
resulting string to the label text.

Eg: Label.Text = TextBox.Text.Replace (Chr(13), "<br>")

Hope this helps.

"buran" <b@b.com> wrote in message
news:O0**************@TK2MSFTNGP09.phx.gbl...
Dear ASP.NET Programmers,

I am carrying the input of a textbox via querystring. When I put the value
of querstring in a label control, the line breaks are removed. The whole
text is displayed as a single line. How can I carry the text as it is
entered? Thanks in advance,

Burak

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.