RouteCollectionExtensions.IgnoreRoute Method (RouteCollection, String, Object)
Ignores the specified URL route for the given list of the available routes and a list of constraints.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
'Declaration <ExtensionAttribute> _ Public Shared Sub IgnoreRoute ( _ routes As RouteCollection, _ url As String, _ constraints As Object _ ) 'Usage Dim routes As RouteCollection Dim url As String Dim constraints As Object routes.IgnoreRoute(url, 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.
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 https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108).aspx or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).aspx.| Exception | Condition |
|---|---|
| ArgumentNullException | The routes or url parameter is Nothing. |
Show: