Click here to Skip to main content
15,919,778 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

Iam entering 300 charaters it label width will expand abnormally.how can i set for label property to move the text to next line.
Posted

Hi,

Add <br /> to label text then it'll comes in next row

All the Best
 
Share this answer
 
v2
Comments
yeshgowda 25-Oct-11 5:59am    
I have to follow the next line once label text has reached maximum screen width
Muralikrishna8811 25-Oct-11 6:04am    
you are binding that data from server side right

then add <br/> after 300 charecter
Muralikrishna8811 25-Oct-11 6:06am    
try this
string restr = str.Substring(0, 400) + "<br/>" + str.Substring(400, str.Length);
yeshgowda 25-Oct-11 7:15am    
Actually in IE6 Label is wrapping to next line but in non -IE browsers it is expanding.Wht to add the property to fix this
Muralikrishna8811 25-Oct-11 7:22am    
k use only <br>
<br> can support all web browsers
 
Share this answer
 
Hi,

You can use the TextBox Control with borderless.


VB
<asp:TextBox BorderStyle="None"   ID="txt_CommentsCab"  CssClass="Txtbox" runat="server"
    Width="350px" Height="350px" />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900