RouteCollectionExtensions.IgnoreRoute Method (RouteCollection, String)

Ignores the specified URL route for the given list of available routes.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub IgnoreRoute ( _
    routes As RouteCollection, _
    url As String _
)
public static void IgnoreRoute(
    this RouteCollection routes,
    string url
)
[ExtensionAttribute]
public:
static void IgnoreRoute(
    RouteCollection^ routes, 
    String^ url
)

Parameters

  • url
    Type: System.String
    The URL pattern for the route to ignore.

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).

Exceptions

Exception Condition
ArgumentNullException

The routes or url parameter is null reference (Nothing in Visual Basic).

See Also

Reference

RouteCollectionExtensions Class

IgnoreRoute Overload

System.Web.Mvc Namespace