How to create carriage return or line feed or new line

Discussion in 'ASP .Net' started by Dave Tichenor, Feb 13, 2004.

  1. How do you create a new line in the mail message; i'm using asp.net.

    I try using - vbcrlf
    - chr(13) and chr(10)
    - Environment.NewLine

    But when i receive the email message it is concatenated all together.

    thanks


    Please see my code below

    msg.Body = TextBox5.Text & chr(13) & chr(10) & _

    Label2.Text & " = " & TxtName.Text & chr(13) &
    chr(10) & _

    Label1.Text & " = " & TxtAdd.Text + " " +
    TxtCity.Text
     
    Dave Tichenor, Feb 13, 2004
    #1
    1. Advertising

  2. Dave Tichenor

    Curt_C [MVP] Guest

    is the mail in HTML? tried a <br> or <p> ?

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "Dave Tichenor" <> wrote in message
    news:...
    > How do you create a new line in the mail message; i'm using asp.net.
    >
    > I try using - vbcrlf
    > - chr(13) and chr(10)
    > - Environment.NewLine
    >
    > But when i receive the email message it is concatenated all together.
    >
    > thanks
    >
    >
    > Please see my code below
    >
    > msg.Body = TextBox5.Text & chr(13) & chr(10) & _
    >
    > Label2.Text & " = " & TxtName.Text & chr(13) &
    > chr(10) & _
    >
    > Label1.Text & " = " & TxtAdd.Text + " " +
    > TxtCity.Text
    >
    >
    >
    >
    >
     
    Curt_C [MVP], Feb 13, 2004
    #2
    1. Advertising

  3. Hi Dave,


    Thanks for posting in the community!
    From your description, you 're wanting to send a certain text as the body
    of email in yoru ASP.NET application. However, you encountered some
    problems when try put some return(start new line) flags in the text ,yes?
    If there is anything I misunderstood, please feel free to let me know.

    As for the problem, I'd like to confirm some further things on it:
    1. Is the mail you'd like to send use "Plain Text" format body or "Html"
    body?
    If html, I think you may need to use the "<br>" html tag to let the content
    return, just as Curt_C has suggested.

    2. If you're using plain text, I think you may have a try using an large
    block of text( retrieving from a exist txt file or from and textarea on the
    page) which contains multi-lines as the mail's body to see whether this
    problem remains.

    Please check out the preceding suggestions. If you have any questions,
    please feel free to post here.


    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Feb 14, 2004
    #3
  4. Hi Dave,


    Have you tried out my suggestions or have you resolved the problem in this
    issue? If you have any problems or need any help, please feel free to let
    me know.



    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Feb 17, 2004
    #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?UmFlZCBTYXdhbGhh?=

    Line Feed & Carriage Return with XML?

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Oct 25, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    12,169
    Kevin Spencer
    Oct 25, 2004
  2. John Dalberg
    Replies:
    0
    Views:
    485
    John Dalberg
    Jan 21, 2005
  3. rjweytens
    Replies:
    3
    Views:
    8,148
    rjweytens
    Jul 30, 2004
  4. Replies:
    2
    Views:
    11,340
    Boudewijn Dijkstra
    Aug 30, 2005
  5. Steve Anderson
    Replies:
    3
    Views:
    277
    Steve Anderson
    Jun 21, 2004
Loading...

Share This Page