Nyana22
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.
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.
You can use
label.Text = "some warning text here" & variable & vbNewLine & "text continue here"
label.Text = "some warning text here" & variable & vbNewLine & "text continue here"
Opps! To slow :)
ASKER
vbcrlf
didn't work
didn't work
ASKER
even vbNewLine didnt work!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
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?