Solved

How to get a label control to wrap text?

Posted on 2006-06-16
4
803 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Allow space in this pattern 2 48
Error on Add method 1 38
SQL Exceptions 3 39
Ajax Panel Not Updating When Triggered By Timer 4 44
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…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now