Click here to Skip to main content
14,699,489 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi there,
I have a multi line text box in a data entry form. The data entered in this field is being stored as ntext column in a table.
This data is visible in other form in DataGridView. Where the newline character is replaced by ugly, obnoxious "squares". I remember having used this with oracle blob column where it did not create a porblem.
Agagin when this fetched in a multiline textbox for editing purpose it displays "squares".
Hw do I handle this. I tried googling but not much to my rescue. Any pointers or ideas would be appreciated.
Thanks for your time.
Posted

1 solution

Use a TemplateField and replace the newline character with <br/>.

<%# Eval("COL1").ToString().Replace("\r\n","<br/>") %>


Something like this ... ;)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900