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

CRLF How does it work for asp.net???!!

P: n/a
Hi All,

Im trying to have a few strings presented in a LABEL. However the CRLF is
not working.

eg str = str1 + crlf + str2 + crlf + str3
label.text= str

Do i need to declare the crlf as a public constant with chrw(10) +
chrw(13)?? cause this does nothing either

Can some one tell me how to resolve this issue?

Thanks
MP
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Michael Persaud" <mi**************@hotmail.com> wrote in
news:OA**************@tk2msftngp13.phx.gbl:
Hi All,

Im trying to have a few strings presented in a LABEL. However
the CRLF is not working.

eg str = str1 + crlf + str2 + crlf + str3
label.text= str

Do i need to declare the crlf as a public constant with chrw(10)
+ chrw(13)?? cause this does nothing either

Can some one tell me how to resolve this issue?


Michael,

The label control generates HTML. Use <BR> instead of a carriage
return/linefeed:

label.Text = str1 + "<BR>" + str2 + "<BR>" + str3;

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 18 '05 #2

P: n/a
Hi Chris
Thanks it works

Didnt thing about the output being in HTML.

Thanks again

Michael

"Chris R. Timmons" <crtimmons@X_NOSPAM_Xcrtimmonsinc.com> wrote in message
news:Xn**********************************@207.46.2 48.16...
"Michael Persaud" <mi**************@hotmail.com> wrote in
news:OA**************@tk2msftngp13.phx.gbl:
Hi All,

Im trying to have a few strings presented in a LABEL. However
the CRLF is not working.

eg str = str1 + crlf + str2 + crlf + str3
label.text= str

Do i need to declare the crlf as a public constant with chrw(10)
+ chrw(13)?? cause this does nothing either

Can some one tell me how to resolve this issue?


Michael,

The label control generates HTML. Use <BR> instead of a carriage
return/linefeed:

label.Text = str1 + "<BR>" + str2 + "<BR>" + str3;

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.