Author: Raitasar | Posted on: 1/14/2009 5:17:11 AM | Views : 282

First of all, apologies if there has been a fix to this already posted. I've trawled the forum looking for people with a similar problem but can't seem to find any although I'd assumed that it must be a fairly common issue for people developing with forms. It could be that I've just missed it.

I have a DataList in which there is a big block of text that is stored in an SQL database table field. When the user switches the DataList to edit mode, a TextArea represents the big block of text and is two way bound to the database. All very simple stuff.

 The problem I'm having is that I have some code in the .cs file that scans the long string and uses the Replace method to replace all the line breaks with <br/> so that the users don't need to have any knowledge of HTML to edit their text. Currently I have /n/r , /n and /r scanned for, in that order and replaced with <br/>.

 This works absolutely fine when the form is su ...

Go to the complete details ...