Stripping all HTML Characters using VB.Net

23. March 2009

Read this article in your language IT | EN | DE | ES

This is actually pretty easy and I had needed to use it on a page where I wanted to use a ToolTip of the contents of an editor which stored the HTML of the content...

Using Regular Expression we can strip off the HTML tags.

   1: Dim ContentDataStrippedOfHTML As StringContentDataStrippedOfHTML = Regex.Replace(SourceOriginalDataStringHere, "<(.|\n)*?>", String.Empty) 
   2:  

Right to the point.

VB.NET

Add comment


(Will show your Gravatar icon)

  Country flag

Click to change captcha
biuquote
  • Comment
  • Preview
Loading