Multi-Line Button text

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" />
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top