Table of Contents

Class HttpUtility

Namespace
SunamoShared
Assembly
SunamoShared.dll

HTTP utility methods to avoid importing System.Web for methods not in WebUtility.

public class HttpUtility
Inheritance
HttpUtility
Inherited Members
Extension Methods

Methods

HtmlDecode(string)

Decodes an HTML-encoded string.

public static string HtmlDecode(string text)

Parameters

text string

The HTML-encoded text to decode.

Returns

string

HtmlEncode(string)

Encodes a string for safe HTML output.

public static string HtmlEncode(string html)

Parameters

html string

The HTML text to encode.

Returns

string

HtmlEncodeWithCompatibility(string, bool)

Encodes a string for safe HTML output with optional backward compatibility.

public static string HtmlEncodeWithCompatibility(string html, bool isBackwardCompatibility = true)

Parameters

html string

The HTML text to encode.

isBackwardCompatibility bool

Whether to use backward-compatible encoding.

Returns

string

ParseQueryString(string)

Parses a query string into a name-value collection.

public static NameValueCollection ParseQueryString(string queryString)

Parameters

queryString string

The query string to parse.

Returns

NameValueCollection

UrlDecode(string)

URL-decodes the specified text.

public static string UrlDecode(string text)

Parameters

text string

The URL-encoded text to decode.

Returns

string

UrlEncode(string)

URL-encodes the specified text.

public static string UrlEncode(string text)

Parameters

text string

The text to URL-encode.

Returns

string