Overview

Various classes for working with URIs.

Microsoft.AspNetCore.Http.QueryString [ Documentation]

“Provides correct handling for QueryString value when needed to reconstruct a request or redirect URI string.”

Microsoft.AspNetCore.Http.Extensions.QueryBuilder [ Documentation]

“For constructing a query string.”

  • Adding onto an existing query string
  • Constructing a QueryString from a QueryBuilder

Microsoft.AspNetCore.Http.Extensions.UriHelper [ Documentation]

“For constructing encoded URIs for use in headers and other URIs.”

  • Combining URI components into an absolute or relative URI
  • Encoding URIs

Microsoft.AspNetCore.Mvc.Routing.UrlHelper [ Documentation]

“An implementation of IUrlHelper that contains methods to build URLs for ASP.NET MVC within an application.”

  • Requires an ActionContext from the current request

Microsoft.AspNetCore.WebUtilities.QueryHelpers [ Documentation]

“Methods for parsing and manipulating query strings.”

  • Add a query string to a URI
  • Parse a query string into its component key/value pairs

System.Uri [ Documentation)]

“Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI.”

  • Checking schema
  • Escaping/un-escaping data

System.UriBuilder [ Documentation]

Constructing and modifying URIs for the Uri class.

  • Properties for each component of a URI

System.Web.HttpUtility [ Documentation]

“Provides methods for encoding and decoding URLs when processing Web requests. This class cannot be inherited.”

  • Encoding/decoding HTML
  • Encoding/decoding URLs
  • Encoding a JavaScript string
  • ParseQueryString into a NameValueCollection