RouteCollectionExtensions.IgnoreRoute Method (RouteCollection, String, Object)

Ignores the specified URL route by using the specified list of the available routes and a list of constraints.

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

public static void IgnoreRoute(
	this RouteCollection routes,
	string url,
	Object constraints
)

Parameters

routes
Type: System.Web.Routing.RouteCollection
The routes.
url
Type: System.String
The URL.
constraints
Type: System.Object
The constraints.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type RouteCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

ExceptionCondition
ArgumentNullException

The routes or url parameter is null.

Community Additions

Show: