Export (0) Print
Expand All

RouteDirection Enumeration

Indicates whether ASP.NET routing is processing a URL from a client or generating a URL.

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

public enum RouteDirection

Member nameDescription
IncomingRequestA URL from a client is being processed.
UrlGenerationA URL is being created based on the route definition.

You can use ASP.NET routing to process a URL by matching it to the route definitions in an ASP.NET application, or to generate URLs that are based on the route definitions. The RouteDirection enumeration provides values that help you differentiate between these scenarios. This is useful because route constraints are processed differently depending on the scenario. If you create a custom route constraint by implementing the IRouteConstraint interface, you might have to check the value of the routeDirection parameter in the Match method to differentiate the scenarios.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft