Edit

Share via


RequestContext Class

Definition

Encapsulates information about an HTTP request that matches a defined route.

public ref class RequestContext
public class RequestContext
type RequestContext = class
Public Class RequestContext
Inheritance
RequestContext

Remarks

The RequestContext class contains information about the HTTP request in the HttpContext property. It contains information about the route that matched the current request in the RouteData property.

When you construct a URL from a route, you pass an instance of the RequestContext class to the RouteCollection.GetVirtualPath method.

Constructors

RequestContext()

Initializes a new instance of the RequestContext class.

RequestContext(HttpContextBase, RouteData)

Initializes a new instance of the RequestContext class.

Properties

HttpContext

Gets information about the HTTP request.

RouteData

Gets information about the requested route.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also