QueryString.ToUriComponent Method

Definition

Provides the query string escaped in a way which is correct for combining into the URI representation. A leading '?' character will be included unless the Value is null or empty. Characters which are potentially dangerous are escaped.

C#
public string ToUriComponent ();

Returns

The query string value

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0