[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to get a label control to wrap text?

Posted on 2006-06-16
4
Medium Priority
?
811 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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