BeanSoftware Logo
 

 
ASP.NET Database Search Control
 
 

 
 Home
    Shop
    Advertise
    Write For Us
    Affiliate
    Newsletter
    Contact

How To Write Line Break In ASP.NET Label Control?

To write text in lines in standard ASP.NET label control you need to use HTML tag <br />. This is example label control that contains text in three lines:

<asp:Label ID="Label1" runat="server"
Text="This is first line<br />This is second line<br /> This is third line">
</asp:Label>

 

If you see this code in design view or at run time, you'll see that text is formatted in three lines, like in image bellow:

Line breaks in label control



Related articles:

1. How To Get Web Site Thumbnail Image In ASP.NET

FAQ toolbar: Submit FAQ  |  Tell A Friend  |  Add to favorites  |  Feedback



Copyright © 2002-2008 Bean Software. All rights reserved.