Export (0) Print
Expand All

RouteCollection.Ignore Method

Defines a URL pattern that should not be checked for matches against routes.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Ignore(String) Defines a URL pattern that should not be checked for matches against routes.
Public method Ignore(String, Object) Defines a URL pattern that should not be checked for matches against routes if a request URL meets the specified constraints.
Top

This method creates a route that is mapped to the StopRoutingHandler route handler. After you call this method, requests that match the specified URL pattern will not be processed as route requests.

ASP.NET routing automatically ignores requests when the URL matches a physical file, such as an image file. In some cases you might also want routing to ignore requests when there is no physical file. For example, the requests that ASP.NET automatically makes for .axd files should not be treated as route requests even though there is no physical file that corresponds to the .axd file-name extension.

Show:
© 2014 Microsoft