CRLF How does it work for asp.net???!!

Discussion in 'ASP .Net' started by Michael Persaud, May 27, 2004.

  1. Hi All,

    Im trying to have a few strings presented in a LABEL. However the CRLF is
    not working.

    eg str = str1 + crlf + str2 + crlf + str3
    label.text= str

    Do i need to declare the crlf as a public constant with chrw(10) +
    chrw(13)?? cause this does nothing either

    Can some one tell me how to resolve this issue?

    Thanks
    MP
    Michael Persaud, May 27, 2004
    #1
    1. Advertising

  2. "Michael Persaud" <> wrote in
    news::

    > Hi All,
    >
    > Im trying to have a few strings presented in a LABEL. However
    > the CRLF is not working.
    >
    > eg str = str1 + crlf + str2 + crlf + str3
    > label.text= str
    >
    > Do i need to declare the crlf as a public constant with chrw(10)
    > + chrw(13)?? cause this does nothing either
    >
    > Can some one tell me how to resolve this issue?


    Michael,

    The label control generates HTML. Use <BR> instead of a carriage
    return/linefeed:

    label.Text = str1 + "<BR>" + str2 + "<BR>" + str3;

    --
    Hope this helps.

    Chris.
    -------------
    C.R. Timmons Consulting, Inc.
    http://www.crtimmonsinc.com/
    Chris R. Timmons, May 27, 2004
    #2
    1. Advertising

  3. Hi Chris
    Thanks it works

    Didnt thing about the output being in HTML.

    Thanks again

    Michael

    "Chris R. Timmons" <crtimmons@X_NOSPAM_Xcrtimmonsinc.com> wrote in message
    news:Xns94F675459327Fcrtimmonscrtimmonsin@207.46.248.16...
    > "Michael Persaud" <> wrote in
    > news::
    >
    > > Hi All,
    > >
    > > Im trying to have a few strings presented in a LABEL. However
    > > the CRLF is not working.
    > >
    > > eg str = str1 + crlf + str2 + crlf + str3
    > > label.text= str
    > >
    > > Do i need to declare the crlf as a public constant with chrw(10)
    > > + chrw(13)?? cause this does nothing either
    > >
    > > Can some one tell me how to resolve this issue?

    >
    > Michael,
    >
    > The label control generates HTML. Use <BR> instead of a carriage
    > return/linefeed:
    >
    > label.Text = str1 + "<BR>" + str2 + "<BR>" + str3;
    >
    > --
    > Hope this helps.
    >
    > Chris.
    > -------------
    > C.R. Timmons Consulting, Inc.
    > http://www.crtimmonsinc.com/
    Michael Persaud, May 27, 2004
    #3
    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. Jerry III

    Re: how to check CRLF in C#

    Jerry III, Aug 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    791
    Jerry III
    Aug 25, 2003
  2. Kevin Spencer

    Re: how to check CRLF in C#

    Kevin Spencer, Aug 25, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    27,932
    Jerry III
    Aug 27, 2003
  3. Simon Chung-Jen Chuang

    Re: how to check CRLF in C#

    Simon Chung-Jen Chuang, Aug 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    418
    Simon Chung-Jen Chuang
    Aug 26, 2003
  4. Jack Wright

    Problem in CRLF in multiline fields

    Jack Wright, Apr 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    393
    Jack Wright
    Apr 21, 2004
  5. WC Justice

    ASP site CRLF commands

    WC Justice, Dec 16, 2004, in forum: ASP General
    Replies:
    5
    Views:
    158
    Hal Rosser
    Dec 17, 2004
Loading...

Share This Page