Solved

How to get a label control to wrap text?

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …

679 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