RouteData.DataTokens 属性
定义
获取一个自定义值的集合,这些值会传递给路由处理程序,但不会在 ASP.NET 路由确定路由是否与请求匹配时进行使用。Gets a collection of custom values that are passed to the route handler but are not used when ASP.NET routing determines whether the route matches a request.
public:
property System::Web::Routing::RouteValueDictionary ^ DataTokens { System::Web::Routing::RouteValueDictionary ^ get(); };
public System.Web.Routing.RouteValueDictionary DataTokens { get; }
member this.DataTokens : System.Web.Routing.RouteValueDictionary
Public ReadOnly Property DataTokens As RouteValueDictionary
属性值
包含自定义值的对象。An object that contains custom values.
注解
DataTokens当 ASP.NET 路由确定路由是否与请求匹配时,可使用属性检索与未使用的路由关联的值。You use the DataTokens property to retrieve values associated with the route that are not used when ASP.NET routing determines whether a route matches a request. 自定义路由处理程序在处理请求时可能需要检索这些值。A custom route handler might have to retrieve these values when it is processing the request.