|
Generally, the key solution to remove ALL html tags from an input area is to use a Regex. (I do that in my site).
Here is the sample:
string commentText = Regex.Replace(this.txtComment.Text, @"<(.|\n)*?>", string.Empty).
If you want to preserve the formatting, just use a replace("<br">, "\r\n). This will insert a line feed carriage return.
|