I have a webpage in which I let user to enter the contents ,even if they change the line frequently in the textbox , the gridview when retrieves it from the database doesn't show any new line.... Can anybody help me out..plz...
+2
A:
Try something like this in your RowDataBound event if you're using C#
e.Row.Cells[0].Text = e.Row.Cells[0].Text.Replace(Environment.NewLine, "<br/>");
where e.Row.Cells[0].Text
is the text retrieved from the database.
Brissles
2010-09-09 08:27:57