Suppose label named lblDescription have html tags. We can remove all html tags as following.
Input Data: <p>Test</p>
Output Data: Test ( No <p> tag )
lblDescription.Text="<p>Test</p>"
string result = Regex.Replace(lblDescription.Text, @"<(.|\n)*?>", string.Empty);
lblDescription.Text = result.Trim();
No comments:
Post a Comment