UrlRoutingModule Class

UrlRoutingModule Class

.NET Framework (current version)
 

Matches a URL request to a defined route.

Namespace:   System.Web.Routing
Assembly:  System.Web (in System.Web.dll)

System.Object
  System.Web.Routing.UrlRoutingModule

public class UrlRoutingModule : IHttpModule

NameDescription
System_CAPS_pubmethodUrlRoutingModule()

Initializes a new instance of the UrlRoutingModule class.

NameDescription
System_CAPS_pubpropertyRouteCollection

Gets or sets the collection of defined routes for the ASP.NET application.

NameDescription
System_CAPS_protmethodDispose()

Disposes of the resources (other than memory) that are used by the module.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodInit(HttpApplication)

Initializes a module and prepares it to handle requests.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodPostMapRequestHandler(HttpContextBase)

Obsolete.Assigns the HTTP handler for the current request to the context.

System_CAPS_pubmethodPostResolveRequestCache(HttpContextBase)

Matches the HTTP request to a route, retrieves the handler for that route, and sets the handler as the HTTP handler for the current request.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIHttpModule.Dispose()

For a description of this member, see Dispose.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIHttpModule.Init(HttpApplication)

For a description of this member, see M:System.Web.IHttpModule.Init.

The UrlRoutingModule class matches an HTTP request to a route in an ASP.NET application. The module iterates through all the routes in the RouteCollection property and searches for a route that has a URL pattern that matches the format of the HTTP request. When the module finds a matching route, it retrieves the IRouteHandler object for that route. From the route handler, the module gets an IHttpHandler object and uses that as the HTTP handler for the current request.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft