Link to home
Start Free TrialLog in
Avatar of Nyana22
Nyana22Flag for Canada

asked on

New line in a ASP.NET label

Hello,
I have one ASP.NET web form, which contain a label to display a warning message.
The label is implemented as :

label.Text = "some warning text here" & variable & "text continue here" & ...

I want that the  "text continue here"  will be displayed on a second line in the same label:

 "some warning text here" & variable
 "text continue here" & ...

Can i do this without using another label, thanks,
i am using VB.
Avatar of Jambyte
Jambyte
Flag of United States of America image

try:

label.Text = "some warning text here" & variable & vbcrlf & "text continue here"

or maybe you can use an html table that will word wrap the label in a table column?
Avatar of Jorge Paulino
You can use
label.Text = "some warning text here" & variable & vbNewLine & "text continue here"
 
Opps! To slow :)
Avatar of Nyana22

ASKER

vbcrlf
didn't work
Avatar of Nyana22

ASKER

even vbNewLine didnt work!
ASKER CERTIFIED SOLUTION
Avatar of Snarf0001
Snarf0001
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nyana22

ASKER

thanks