Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Multi-Line Button text

Reply
Thread Tools

Multi-Line Button text

 
 
David C
Guest
Posts: n/a
 
      06-14-2009
I have an asp Button control that I would like to have the Text show with a
Line Break. I have tried the Text below, but it does not work as it just
displays the <br /> in the text. Thanks.

David

<asp:Button ID="BtnInitialContact" runat="server" Text="Initial<br
/>Contact" />


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-14-2009
On Jun 14, 6:48*pm, "David C" <(E-Mail Removed)> wrote:
> I have an asp Button control that I would like to have the Text show with a
> Line Break. *I have tried the Text below, but it does not work as it just
> displays the <br /> in the text. *Thanks.
>
> David
>
> <asp:Button ID="BtnInitialContact" runat="server" Text="Initial<br
> />Contact" />


I am not sure if it is possible to do from the inline code but you can
use the Text property to set break programmatically:

for vb.net: BtnInitialContact.Text = "Initial" + chr(13) + "Contact"
for c#: BtnInitialContact.Text = "Initial\nContact";

Hope this helps
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Align Radio Button text and button tshad ASP .Net 6 11-26-2009 08:52 AM
Ajax, changing text in a button, and button click problem Tim ASP .Net 0 07-23-2008 07:57 PM
Localization - Automating Button Text + Button Width Robert Cramer ASP .Net 1 03-11-2008 12:14 AM
Button text on top of a button icon Parachute Java 2 02-27-2007 07:23 AM
How to fire both event button click and textchanged when button is click and text is changed Amy ASP .Net 0 06-01-2006 02:33 PM



Advertisments