Multi-Line Button text

Discussion in 'ASP .Net' started by David C, Jun 14, 2009.

  1. David C

    David C 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" />
    David C, Jun 14, 2009
    #1
    1. Advertising

  2. On Jun 14, 6:48 pm, "David C" <> 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
    Alexey Smirnov, Jun 15, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dean
    Replies:
    5
    Views:
    460
    Phlip
    Jun 4, 2006
  2. kaushikshome
    Replies:
    4
    Views:
    762
    kaushikshome
    Sep 10, 2006
  3. bernadou

    Force multi line field value to output with line breaks?

    bernadou, Jan 22, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    358
    bernadou
    Jan 23, 2006
  4. Replies:
    2
    Views:
    141
  5. Anthony Papillion
    Replies:
    0
    Views:
    121
    Anthony Papillion
    Sep 2, 2013
Loading...

Share This Page