Problem in CRLF in multiline fields

Discussion in 'ASP .Net' started by Jack Wright, Apr 20, 2004.

  1. Jack Wright

    Jack Wright Guest

    Dear All,
    In a multiline field if I enter the following way:
    Mangesh
    Anant
    Kodilkar

    There is a carriage return after each word.
    Now when I press save,it loses the CRLF characters. This is not
    correct. Even after the page is reloaded the CRLF's are lost. I get
    this problem on my PC (XP), on Win (2000), on Win (NT & 98). So I
    don't think this is machine specific.

    I tried to debug the problem and was surprised to find that it is a
    ..NET Framework 1.0 bug.
    This does not happen in .NET Framework 1.1.
    I have checked this on pages coding own XMLSerializer.
    Creation of Object from XML nodes truncates the enter characters in
    Framework 1.0.

    The Trace before the WebService call and after WebService call show
    that the CRLF character is eaten up by the serializer.

    We tried to solve the problem in following way:
    ITextBox.GetMyValue: Replace CRLF with 2 special characters
    RecObj.Insert: Replace special characters with CRLF
    ITBTextBox.SetMyValue: Replace special characters with CRLF
    But this will affect performance. How do I proceed?

    Please guide.

    TALIA
    Many Regards
    Jack
     
    Jack Wright, Apr 20, 2004
    #1
    1. Advertising

  2. Jack Wright

    Jack Wright Guest

    Dear All,
    We have been able to get to the root of this problem...
    If to the field in the class object that had the muli-line text we make
    it an <XMLAttribute> then during serialization the text and value
    appears inline as a result the carriage return gets lost...
    <Class1 myMuliValue ="Anant Mangesh Kodilkar"...>

    <Class1>
    <myMuliValue>
    Mangesh
    Anant
    Kodilkar
    </myMultiValue>
    ...
    </Class1>

    This is a problem only in .Net 1.0 and not in .Net 1.1.

    Many Regards
    Sunil


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Jack Wright, Apr 21, 2004
    #2
    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. sso
    Replies:
    20
    Views:
    2,676
    Martin Gregorie
    Apr 26, 2009
  2. Jeff Johnson
    Replies:
    0
    Views:
    680
    Jeff Johnson
    Jul 1, 2009
  3. durumdara
    Replies:
    3
    Views:
    577
    Stefan Behnel
    Dec 2, 2011
  4. dale zhang
    Replies:
    8
    Views:
    428
    Tintin
    Nov 30, 2004
  5. Iver Erling Årva

    Paste multiline text into several input fields

    Iver Erling Årva, Oct 2, 2005, in forum: Javascript
    Replies:
    5
    Views:
    144
    Iver Erling Årva
    Oct 2, 2005
Loading...

Share This Page