RouteCollectionExtensions.IgnoreRoute Method
Ignores the specified route.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | IgnoreRoute(RouteCollection, String) | Ignores the specified URL route for the given list of available routes. |
![]() ![]() | IgnoreRoute(RouteCollection, String, Object) | Ignores the specified URL route for the given list of the available routes and a list of constraints. |
RouteCollectionExtensions.IgnoreRoute Method (RouteCollection, String)
Ignores the specified URL route for the given list of available routes.
Parameters
- routes
-
Type:
System.Web.Routing.RouteCollection
A collection of routes for the application.
- url
-
Type:
System.String
The URL pattern for the route to ignore.
| Exception | Condition |
|---|---|
| ArgumentNullException | The routes or url parameter is null. |
RouteCollectionExtensions.IgnoreRoute Method (RouteCollection, String, Object)
Ignores the specified URL route for the given list of the available routes and a list of constraints.
public static void IgnoreRoute( this RouteCollection routes, string url, object constraints )
Parameters
- routes
-
Type:
System.Web.Routing.RouteCollection
A collection of routes for the application.
- url
-
Type:
System.String
The URL pattern for the route to ignore.
- constraints
-
Type:
System.Object
A set of expressions that specify values for the url parameter.
| Exception | Condition |
|---|---|
| ArgumentNullException | The routes or url parameter is null. |
Show:

