1

I have a Gridview with a textarea. when i have line breaks in the textarea it is corrrectly saving those line breaks to the database. but when i display the same i see it as </br> instead of a line break

enter image description here

enter image description here

So the Data is saved in the table as test1<br/<br/><test2>. This gets displayed properly in the view mode, but when i click the edit button to update the data i see the the <br/> tags instead of actual line breaks. How can i solve this issue?

This is differernt from the New line in text area question as i do not have control over the innerText of the TextArea. This is being dynamically generated from the Database and i cannot change the contents of the DB as this would cause problems in the display in view mode

Community
  • 1
  • 1
MarsOne
  • 2,155
  • 5
  • 29
  • 53
  • how do you submit it to the database? (using a servlet?). What you could easily do is, replace the string(textarea input) "
    " with "\n" and submit. have a look and see. ex: var input= $("#txtarea1").text().replaceAll("
    ","\n");
    – Nomesh DeSilva Oct 15 '14 at 12:03

0 Answers0