RouteParameter.RouteKey 属性

定义

获取或设置从中检索路由参数值的路由段的名称。

public:
 property System::String ^ RouteKey { System::String ^ get(); void set(System::String ^ value); };
public string RouteKey { get; set; }
member this.RouteKey : string with get, set
Public Property RouteKey As String

属性值

String

包含参数值的路由段的名称。

注解

定义路由模式时,可以在 Web 请求 URL 中包括用作实际值的占位符的段。 通过用大括号括住占位符 { } () 。 例如,格式为 的路由模式 blog/{action}/{entry} 包含名为 和 的 action 占位符 entry 。 若要检索占位符的值,将 属性设置为占位符 RouteKey 的名称并调用 Evaluate 方法。

适用于

另请参阅