DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

Display multiline text on ASP.NET Button

By Ashok Nalam on 26 Nov 2013 | Category: ASP.NET | Tagged: button .NET 
  Discuss Add Comment   |  
Add rating Rate this resource   
The tip shows how to display ASP.NET button with Multiline text. This could be a rare scenario but still you can achieve it using following code. 

<asp:Button ID="btnTextasMulLines" runat="server" Text="Button Text&#010;in&#010;Multiple lines" Width="150px" Height="100px" />
<br />
<asp:Button ID="btnTextasMulLinesCB" runat="server" Width="150px" Height="100px" />
protected void Page_Load(object sender, EventArgs e)
        btnTextasMulLinesCB.Text = "Button Text" + Environment.NewLine + "in" + Environment.NewLine + 	    "Multiple lines" + Environment.NewLine + "from Codebehind";


Note: Its works in most of the browsers but for compatibility issue Please test the functionality with all browsers.
  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 9026  (Professional)
Location : INDIA
Home Page :
About : I am admin of this site.
Rate this resource
Add your Comment
Name Email WebSite
Captcha Refresh

Comments (2)
1. By ZAP on 05 Dec 2022

2. By ZAP on 05 Dec 2022