Multi-Line Button text

  • Thread starter Thread starter David C
  • Start date Start date
D

David C

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 have an asp Button control that I would like to have the Text show witha
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
 
Back
Top