RouteParameter.RouteKey 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置从中检索路由参数值的路由段的名称。
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
属性值
包含参数值的路由段的名称。
注解
定义路由模式时,可以在 Web 请求 URL 中包括用作实际值的占位符的段。 通过用大括号括住占位符 {
}
() 。 例如,格式为 的路由模式 blog/{action}/{entry}
包含名为 和 的 action
占位符 entry
。 若要检索占位符的值,将 属性设置为占位符 RouteKey 的名称并调用 Evaluate 方法。