How to break line in web page?

chhibber

New Member
I want to format the content before showing to web page. I am storing '\r\n\' as enter in Database and trying to replace it before show content on the web page. server side my code is:\[code\]lblComments.Text = Server.HtmlEncode(((DataRowView)e.Item.DataItem).Row["Comment"].ToString().Replace("\r\n", "<br>"));\[/code\]I have use \[code\]Server.HtmlEncode\[/code\].My Out put should be:\[code\]Comment Type: PublicComment: Commented on the Data by user A\[/code\]But, its shows me everything in single line.
 
Back
Top