To strip html tags from string in C# and VB.NET you can use the following snippet.
Sample C#
public string StripHtmlTags (string input) { string pattern = "<.*?>"; return Regex.Replace (input, pattern, string.Empty); }
Sample VB.NET
Public Function StripHtmlTags(input As String) As String Dim pattern As String = "<.*?>" Return Regex.Replace(input, pattern, String.Empty) End Function
RT @CodeSnippetsNET: How to strip html tags from string in .NET http://t.co/1QvnGryXbA #csharp #vb #dotnet #programming