-1

I am working on a web development project where I want add details for particular foods. So I added a multiline textbox where I want to type the details. I wanted to save that details into database and later wanted to use those text in another page reading from the database. But when I am showing those text into another webpage all the text are showing into single line. What should I do to resolve this problem?

2 Answers2

1

Try showing the \n (new line) this way:

text.Replace("\n","<br/>")
VahidN
  • 18,457
  • 8
  • 73
  • 117
0

Use textarea instead of textbox and then get data using getInnerHTML this helps to save formatted data

Raed Alsaleh
  • 1,581
  • 9
  • 27
  • 50