Re: multiline text box and carriage return ('\n) character

From: Peter van der Goes (p_vandergoes_at_toadstool.u)
Date: 11/11/04

  • Next message: Don McNamara: "Re: Enterprise Programming"
    Date: Thu, 11 Nov 2004 07:16:27 -0600
    
    

    "raj" <raj@discussions.microsoft.com> wrote in message
    news:2EC12C94-1E90-48B9-B25B-15AE796F5E5E@microsoft.com...
    >
    > I have multiline-text box in my C# application.
    >
    > User enter text into the multiline-text box, and without completing the
    > whole line, user press Enter Key and go to the next line, by leaving the
    > '\n'(new line character) in the string.
    >
    > I use this text to write to a database field and then write that field to
    an
    > excel file.
    > The string is not writing to a single line as it has the carriage return
    > ('\n), wraps the text into the next line in the excel spread ***. This
    make
    > my excel report inconsistance.
    >
    > Does anyone knows how to fix this?
    > I appreciate any ideas
    >
    > thanks
    >
    > raj
    Save the contents of your multiline textbox in a String object, then use
    available member functions to remove the offending characters using member
    functions such as Remove() and Replace(). Then pass the fixed string to the
    spread***?

    -- 
    Peter [MVP Visual Developer]
    Jack of all trades, master of none.
    

  • Next message: Don McNamara: "Re: Enterprise Programming"
    Loading