RouteCollection.GetRouteData(HttpContextBase) 方法
定义
返回有关集合中与指定值匹配的路由的信息。Returns information about the route in the collection that matches the specified values.
public:
System::Web::Routing::RouteData ^ GetRouteData(System::Web::HttpContextBase ^ httpContext);
public System.Web.Routing.RouteData GetRouteData (System.Web.HttpContextBase httpContext);
member this.GetRouteData : System.Web.HttpContextBase -> System.Web.Routing.RouteData
Public Function GetRouteData (httpContext As HttpContextBase) As RouteData
参数
- httpContext
- HttpContextBase
一个对象,该对象封装有关 HTTP 请求的信息。An object that encapsulates information about the HTTP request.
返回
一个对象,其中包含路由定义中的值。An object that contains the values from the route definition.
例外
context 为 null。context is null.
context 参数中对象的 Request 属性为 null。The Request property of the object in the context parameter is null.