mercredi 29 avril 2015

ASP.NET saving text to database in correct format

I have an ASP.net 4.5 text box with 5 rows. When I save the below data to my table it does not take in consideration that there are line breaks.

Example:

Hello my name is Mike! How are you?

Please can you help?

When saving this data to my table it of course save it like this below and it will be displayed like this again if I populate my website with this value.

Hello my name is Mike!How are you?Please can you help?

But I want it to be displayed with the line breaks as the way it was written in the first place.

The thing is, I do not want to make use of a custom form item because then the user will be able to copy and paste all html from another website in and I do not want that.

Any idea how this can be done without using a plugin such as below where the user will be able to copy and paste data into?

enter image description here




Aucun commentaire:

Enregistrer un commentaire