C
CK
Hi all,
I have a textarea control. I am putting it's value in an html email. The
problem is that the new lines are being ignored. I want to take the
controls value and replace any newline carriage returns, with an html <br>
tag. I tried the following function but it doesn't work. Does anyone have
any ideas how to accomplish this? Thanks in advance. ~ CK
string getComments()
{
string s = tbxComments.Text;
Regex r = new Regex("/\n/g");
s = r.Replace(s, "<br/>");
return s;
}
I have a textarea control. I am putting it's value in an html email. The
problem is that the new lines are being ignored. I want to take the
controls value and replace any newline carriage returns, with an html <br>
tag. I tried the following function but it doesn't work. Does anyone have
any ideas how to accomplish this? Thanks in advance. ~ CK
string getComments()
{
string s = tbxComments.Text;
Regex r = new Regex("/\n/g");
s = r.Replace(s, "<br/>");
return s;
}