11
I am getting a string from database field named 'Description' and it has line breaks. It looks like this:
Header of Items
Description goes here.This the description of items.
How can I remove the line breaks. I tried following function but It is not working:
public string FormatComments(string comments)
{
string result = comments.Replace(@"\r\n\", "");
result = result.Replace(" ", "");
return result;
}
Please suggest solution.
Regards, Asif Hameed