"\r\n" being added to content when submitted
Article Info
Rating: Not rated
|
Article relates to
|
Telerik.Web.UI 2008.2.723+
|
|
Created by
|
Rumen Zhekov
|
QUESTION
Why is the "\r\n" being added to the end of the text when being submitted?
ANSWER
The \r\n are added for readability. Due to them when the editor's content is displayed in Html mode or in the Database it will be readable.
If you do not want these line-feed and line breaks in the produced content you can use the Trim method of the Content server property:
RadEditor1.Content.Trim(); .
Another approach is to replace the line-feed and new line with empty string using the Replace method
RadEditor1.Content.Replace("\r", "").Replace("\n", "");
Comments
There are no comments yet.
If you'd like to comment on this KB
article, please, send us a
Support Ticket.
Thank you!
Please
Sign In
to rate this article.