Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MapRoute Method (String, String, Object)

AreaRegistrationContext.MapRoute Method (String, String, Object)

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values.

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

'Declaration
Public Function MapRoute ( _
	name As String, _
	url As String, _
	defaults As Object _
) As Route
'Usage
Dim instance As AreaRegistrationContext 
Dim name As String 
Dim url As String 
Dim defaults As Object 
Dim returnValue As Route 

returnValue = instance.MapRoute(name, _
	url, defaults)

Parameters

name
Type: System.String

The name of the route.

url
Type: System.String

The URL pattern for the route.

defaults
Type: System.Object

An object that contains default route values.

Return Value

Type: System.Web.Routing.Route
A reference to the mapped route.

ExceptionCondition
ArgumentNullException

The url parameter is Nothing.

Show:
© 2015 Microsoft