This is a migrated thread and some comments may be shown as answers.

RadTextBox Line Break Issues

1 Answer 214 Views
Input
This is a migrated thread and some comments may be shown as answers.
Pat
Top achievements
Rank 1
Pat asked on 28 Dec 2011, 05:17 PM
I am using the RadTextBox with MultiLine enabled.  The issue i am having is that i need to determine whether or not there have been changes from what is being held in the database, and if there has been changes then display a warning message.  Chrome, Safari, Firefox all work fine; however, in Internet Explorer and Opera new lines are changed from  Line Feeds (\n) to a Carriage Return followed by a Line Feed (\r\n). Therefore, even if a person doesn't make changes to the RadTextBox, Internet Explorer/Opera will see the string coming from the database (the string with just \n's) different from what's in the RadTextBox (the string with \r\n's).  

I have attached images of what is being displayed, along with what is being seen in the RadTextBox (ContentEditor.Text) and what is being seen in the database (CurrentContent).  Also, below should be a snippet of the aspx code for my RadTextBox:

<telerik:RadTextBox runat="server" ID="ContentEditor" Height="200px" Width="580px" TextMode="MultiLine"
Wrap="true" ></telerik:RadTextBox>

Is there anyway to fix this, or is there a reason why this is happening?

Thanks again for the help,

- Pat

1 Answer, 1 is accepted

Sort by
0
Pat
Top achievements
Rank 1
answered on 28 Dec 2011, 06:50 PM
Fixed the issue.

When comparing the database and the radtextbox content, i replaced all linefeeds and carriage returns to "" in both and then compared them.  Thanks anyways for the help!

-  Pat
Tags
Input
Asked by
Pat
Top achievements
Rank 1
Answers by
Pat
Top achievements
Rank 1
Share this question
or