Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to get a label control to wrap text?

Posted on 2006-06-16
4
Medium Priority
?
814 Views
Last Modified: 2008-08-10
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.


0
Comment
Question by:TZych
4 Comments
 
LVL 3

Accepted Solution

by:
meomar earned 1500 total points
ID: 16923890
Because the label gets rendered as HTML , the only way will be by inserting <BR>
0
 
LVL 2

Expert Comment

by:boricua1213
ID: 16924020
I would put the text between <p></p> tags that should auto wrap.

ex.

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


that should do it
0
 
LVL 8

Author Comment

by:TZych
ID: 16925294
boricua, I tried that and it didn't work.
0
 

Expert Comment

by:neveninfotech
ID: 22201899
its working for me, excellent - saji
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question