AreaRegistrationContext.MapRoute 方法

定义

重载

MapRoute(String, String)

映射指定的 URL 路线,并将其与 属性指定的 AreaName 区域相关联。

MapRoute(String, String, Object)

映射指定的 URL 路线,并使用指定的路线默认值将其与 属性指定的 AreaName 区域相关联。

MapRoute(String, String, String[])

映射指定的 URL 路由,并使用指定的命名空间将其与 属性指定的 AreaName 区域相关联。

MapRoute(String, String, Object, Object)

映射指定的 URL 路线,并使用指定的路由默认值和约束将其与 属性指定的 AreaName 区域相关联。

MapRoute(String, String, Object, String[])

映射指定的 URL 路由,并使用指定的路由默认值和命名空间将其与 属性指定的 AreaName 区域相关联。

MapRoute(String, String, Object, Object, String[])

映射指定的 URL 路由,并使用指定的路由默认值、约束和命名空间将其与 属性指定的 AreaName 区域相关联。

MapRoute(String, String)

映射指定的 URL 路线,并将其与 属性指定的 AreaName 区域相关联。

public System.Web.Routing.Route MapRoute (string name, string url);
member this.MapRoute : string * string -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String) As Route

参数

name
String

路由的名称。

url
String

路由的 URL 模式。

返回

对映射路由的引用。

例外

url 参数为 null。

适用于

MapRoute(String, String, Object)

映射指定的 URL 路线,并使用指定的路线默认值将其与 属性指定的 AreaName 区域相关联。

public System.Web.Routing.Route MapRoute (string name, string url, object defaults);
member this.MapRoute : string * string * obj -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, defaults As Object) As Route

参数

name
String

路由的名称。

url
String

路由的 URL 模式。

defaults
Object

一个包含默认路由值的对象。

返回

对映射路由的引用。

例外

url 参数为 null。

适用于

MapRoute(String, String, String[])

映射指定的 URL 路由,并使用指定的命名空间将其与 属性指定的 AreaName 区域相关联。

public System.Web.Routing.Route MapRoute (string name, string url, string[] namespaces);
member this.MapRoute : string * string * string[] -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, namespaces As String()) As Route

参数

name
String

路由的名称。

url
String

路由的 URL 模式。

namespaces
String[]

应用程序的一组可枚举的命名空间。

返回

对映射路由的引用。

例外

url 参数为 null。

适用于

MapRoute(String, String, Object, Object)

映射指定的 URL 路线,并使用指定的路由默认值和约束将其与 属性指定的 AreaName 区域相关联。

public System.Web.Routing.Route MapRoute (string name, string url, object defaults, object constraints);
member this.MapRoute : string * string * obj * obj -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, defaults As Object, constraints As Object) As Route

参数

name
String

路由的名称。

url
String

路由的 URL 模式。

defaults
Object

一个包含默认路由值的对象。

constraints
Object

一组用于指定 URL 参数的有效值的表达式。

返回

对映射路由的引用。

例外

url 参数为 null。

适用于

MapRoute(String, String, Object, String[])

映射指定的 URL 路由,并使用指定的路由默认值和命名空间将其与 属性指定的 AreaName 区域相关联。

public System.Web.Routing.Route MapRoute (string name, string url, object defaults, string[] namespaces);
member this.MapRoute : string * string * obj * string[] -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, defaults As Object, namespaces As String()) As Route

参数

name
String

路由的名称。

url
String

路由的 URL 模式。

defaults
Object

一个包含默认路由值的对象。

namespaces
String[]

应用程序的一组可枚举的命名空间。

返回

对映射路由的引用。

例外

url 参数为 null。

适用于

MapRoute(String, String, Object, Object, String[])

映射指定的 URL 路由,并使用指定的路由默认值、约束和命名空间将其与 属性指定的 AreaName 区域相关联。

public System.Web.Routing.Route MapRoute (string name, string url, object defaults, object constraints, string[] namespaces);
member this.MapRoute : string * string * obj * obj * string[] -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, defaults As Object, constraints As Object, namespaces As String()) As Route

参数

name
String

路由的名称。

url
String

路由的 URL 模式。

defaults
Object

一个包含默认路由值的对象。

constraints
Object

一组用于指定 URL 参数的有效值的表达式。

namespaces
String[]

应用程序的一组可枚举的命名空间。

返回

对映射路由的引用。

例外

url 参数为 null。

适用于