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?
Asked
Active
Viewed 3,827 times
-1
-
Why are you using a multiline textbox? – Vajura Mar 17 '15 at 12:47
-
3@Vajura: Why do you care? – Patrick Hofman Mar 17 '15 at 12:48
-
Carriage returns don't render on a web page. When you display the text you need to replace carriage returns with "br" tags. – David Mar 17 '15 at 12:48
-
You can check this:- http://stackoverflow.com/questions/4883613/asp-net-text-with-linebreak-from-multi-line-textbox-to-save-in-a-database – Rahul Singh Mar 17 '15 at 12:50
-
Thanks, i got the answer now. @Rahul – Saif Mahmud Parvez Mar 17 '15 at 12:59
2 Answers
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