Hi fellows, I have a simple web application which takes an input as a description (textarea). When user enters the information user press the return key (“enter”) to go to the next line or enter few new lines. Now I am storing that in the database (MsAccess). When I display the text back on the page I want to display as user has entered rather displaying as one block of a paragraph. Is there any way in C# that I convert that html “enter” key chracter with <br>? Please help me.
thank you.
This is what I use:
public static string NewLineToBreak(string input)
{
Regex regEx = new Regex(@"[\
|\\r]+");
return regEx.Replace(input, "<br />");
}
Thank you so much htmlgod. It works like a charm. thanks again.