How to get a label control to wrap text?

I have an ASP.Net app that displays HTML in a label control.

However, when a line of text is too long, it goes all the way to the right and you have to use the bottom scrollbar to see it all.

Is there a way to get it to wrap the text? If so, how? Or, must I insert <BR> characters at predetermined points in the string, say every 80 characters or whatever?

thanks.


LVL 8
TZychAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
meomarConnect With a Mentor Commented:
Because the label gets rendered as HTML , the only way will be by inserting <BR>
0
 
boricua1213Commented:
I would put the text between <p></p> tags that should auto wrap.

ex.

lable.text="<p>" & text & "</p>


that should do it
0
 
TZychAuthor Commented:
boricua, I tried that and it didn't work.
0
 
neveninfotechCommented:
its working for me, excellent - saji
0
All Courses

From novice to tech pro — start learning today.