RouteCollectionExtensions.MapRoute Method (RouteCollection, String, String)
Visual Studio 2010
Maps the specified URL route.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Parameters
- routes
- Type: System.Web.Routing.RouteCollection
A collection of routes for the application.
- name
- Type: System.String
The name of the route to map.
- url
- Type: System.String
The URL pattern for the route.
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).| Exception | Condition |
|---|---|
| ArgumentNullException | The routes or url parameter is null. |
Community Additions
ADD
Show: