June 23, 2011

remove/prevent html tag

for example we have txtbox1 (textbox control), so we can remove the html tag with :
System.Text.RegularExpressions.Regex.Replace(txtbox1.Text, "<[^>]*>", string.Empty);

No comments: