How to break line in Label control

Discussion in 'ASP .Net' started by Jacek Stepniewski, Dec 3, 2003.

  1. Hi,
    I would like to use <BR> in label control to break the line, but the control
    converts "<" and ">" to entity. How can i break the line??

    Jack
     
    Jacek Stepniewski, Dec 3, 2003
    #1
    1. Advertising

  2. > Hi,
    > I would like to use <BR> in label control to break the line, but the

    control
    > converts "<" and ">" to entity. How can i break the line??


    and this is simple example (i would like to break line in Text property of
    label control):

    Label1.Text = "Line1<BR>Line2";

    It doesn't works... any ideas?

    Jack
     
    Jacek Stepniewski, Dec 3, 2003
    #2
    1. Advertising

  3. Jacek Stepniewski

    Martin Guest

    > > I would like to use <BR> in label control to break the line, but the
    > > control converts "<" and ">" to entity. How can i break the line??



    Try changing the labels width to see if it will wrap text for you. If that
    doesn't work, use two different label controls.or another type of control
    that does wrap or process line breaks.

    It seems to me you want something that was never meant to be. Like I once
    tried for about an hour to include carriage returns in the text part of an
    XML element... The name element does make sense.
     
    Martin, Dec 3, 2003
    #3
  4. Jacek Stepniewski

    mikeb Guest

    Jacek Stepniewski wrote:

    >>Hi,
    >>I would like to use <BR> in label control to break the line, but the

    >
    > control
    >
    >>converts "<" and ">" to entity. How can i break the line??

    >
    >
    > and this is simple example (i would like to break line in Text property of
    > label control):
    >
    > Label1.Text = "Line1<BR>Line2";
    >
    > It doesn't works... any ideas?
    >
    > Jack
    >
    >


    It works just fine for me - could you post a very small complete example
    that reproduces your problem.

    --
    mikeb
     
    mikeb, Dec 4, 2003
    #4
    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. =?Utf-8?B?TWFyZHk=?=

    Insert a line break in a label control

    =?Utf-8?B?TWFyZHk=?=, Jul 30, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    8,204
    =?Utf-8?B?TWFyZHk=?=
    Jul 30, 2005
  2. pavan
    Replies:
    2
    Views:
    435
    Greg Young
    May 5, 2006
  3. Shawn
    Replies:
    2
    Views:
    287
  4. Shawn
    Replies:
    3
    Views:
    343
    Oliver Wong
    Nov 29, 2006
  5. Knut Krueger
    Replies:
    8
    Views:
    306
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page