Problem in CRLF in multiline fields

J

Jack Wright

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
 
J

Jack Wright

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top