Professional Web Applications Themes

how to check CRLF in C# - ASP.NET General

Replace("\r\n", "<br>"); Please learn C# before you get into programming server applications and post into the right group, this has nothing to do with ASP.NET. Jerry "Simon Chung-Jen Chuang" <net.tw> wrote in message news:phx.gbl...  C#. ...

  1. #1

    Default Re: how to check CRLF in C#

    Replace("\r\n", "<br>");

    Please learn C# before you get into programming server applications and post
    into the right group, this has nothing to do with ASP.NET.

    Jerry

    "Simon Chung-Jen Chuang" <net.tw> wrote in message
    news:phx.gbl... 
    C#. 


    Jerry Guest

  2. #2

    Default Re: how to check CRLF in C#

    theString.Replace(Environment.NewLine, "<br>")

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    The more I learn, the less I know.

    "Simon Chung-Jen Chuang" <net.tw> wrote in message
    news:phx.gbl... 
    C#. 


    Kevin Guest

  3. #3

    Default Re: how to check CRLF in C#

    It is altogether safer all around to check for Environment.Newline

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    The more I learn, the less I know.

    "Jerry III" <com> wrote in message
    news:phx.gbl... 
    new 
    don't 
    >
    >[/ref]


    Kevin Guest

  4. #4

    Default Re: how to check CRLF in C#

    Hello,

    You are right. I forgot to store the new string.

    Thanks a lot,
    Simon


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Simon Guest

  5. #5

    Default Re: how to check CRLF in C#

    Jerry,

    The original message didsn't specify any such thing. The author used "CRLF"
    in the title, but obviously didn't know exactly what he was looking for,
    other than a method to replace new line character/combination in a string.
    Using Environment.Newline will return the correct new line character or
    combination for whatever platform one is working on, and is the safest thing
    to use. That is what it's for. My advice was correct.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    The more I learn, the less I know.

    "Jerry III" <com> wrote in message
    news:e%23Ur9A$phx.gbl... 
    not [/ref][/ref]

    > > don't [/ref][/ref]
    not 
    > >
    > >[/ref]
    >
    >[/ref]


    Kevin Guest

  6. #6

    Default Re: how to check CRLF in C#

    As long as the files are created on the same platform - you're fine. And
    while that's most likely going to be the case there's a chance it won't - a
    windows app may read files created by a Unix (or even mainframe, EBCDIC is a
    whole new story) app. Or when you move your app from Windows to Linux but
    the input files are still going to be created on Windows. So you should
    replace whatever your case is, both examples were correct and as I said, it
    depends on what exactly are you trying to accomplish.

    Jerry

    "Kevin Spencer" <com> wrote in message
    news:OaMJUj$phx.gbl... 
    "CRLF" 
    thing 
    > not [/ref][/ref]
    creates [/ref][/ref]
    string), [/ref]
    > not 
    > >
    > >[/ref]
    >
    >[/ref]


    Jerry Guest

Similar Threads

  1. #15841 [NoF]: CRLF to separate mail headers is incorrect
    By tony2001@php.net in forum PHP Bugs
    Replies: 0
    Last Post: February 7th, 10:05 AM
  2. CRLF at the end of cfmail subject gives corrupt mailheader
    By XL-Network in forum Macromedia ColdFusion
    Replies: 0
    Last Post: June 15th, 09:59 AM
  3. CRLF to <br>
    By Steven Stern in forum PHP Development
    Replies: 3
    Last Post: July 28th, 10:39 PM
  4. Replies: 3
    Last Post: January 9th, 09:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139