AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

StringExtensions..::..StripHTML Method

Removes all HTML tags from the string, returning only the text content.

Namespace:  AdvantageCMS.Core.Common
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public static string StripHTML(
	this string text
)

Parameters

text
Type: String
The HTML string to strip.

Return Value

The string with all HTML tags removed.

Examples


C#
string plain = "<p>Hello <b>World</b></p>".StripHTML(); // returns "Hello World"