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

M

Michael Persaud

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
 
C

Chris R. Timmons

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;
 
M

Michael Persaud

Hi Chris
Thanks it works

Didnt thing about the output being in HTML.

Thanks again

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top