Редагувати

Поділитися через


RouteCollection.GetVirtualPath Method

Definition

Returns information about the URL path that is associated with the route.

Overloads

GetVirtualPath(RequestContext, RouteValueDictionary)

Returns information about the URL path that is associated with the route, given the specified context and parameter values.

GetVirtualPath(RequestContext, String, RouteValueDictionary)

Returns information about the URL path that is associated with the named route, given the specified context, route name, and parameter values.

GetVirtualPath(RequestContext, RouteValueDictionary)

Returns information about the URL path that is associated with the route, given the specified context and parameter values.

public:
 System::Web::Routing::VirtualPathData ^ GetVirtualPath(System::Web::Routing::RequestContext ^ requestContext, System::Web::Routing::RouteValueDictionary ^ values);
public System.Web.Routing.VirtualPathData GetVirtualPath (System.Web.Routing.RequestContext requestContext, System.Web.Routing.RouteValueDictionary values);
member this.GetVirtualPath : System.Web.Routing.RequestContext * System.Web.Routing.RouteValueDictionary -> System.Web.Routing.VirtualPathData
Public Function GetVirtualPath (requestContext As RequestContext, values As RouteValueDictionary) As VirtualPathData

Parameters

requestContext
RequestContext

An object that encapsulates information about the requested route.

values
RouteValueDictionary

An object that contains the parameters for a route.

Returns

An object that contains information about the URL path that is associated with the route.

See also

Applies to

GetVirtualPath(RequestContext, String, RouteValueDictionary)

Returns information about the URL path that is associated with the named route, given the specified context, route name, and parameter values.

public:
 System::Web::Routing::VirtualPathData ^ GetVirtualPath(System::Web::Routing::RequestContext ^ requestContext, System::String ^ name, System::Web::Routing::RouteValueDictionary ^ values);
public System.Web.Routing.VirtualPathData GetVirtualPath (System.Web.Routing.RequestContext requestContext, string name, System.Web.Routing.RouteValueDictionary values);
member this.GetVirtualPath : System.Web.Routing.RequestContext * string * System.Web.Routing.RouteValueDictionary -> System.Web.Routing.VirtualPathData
Public Function GetVirtualPath (requestContext As RequestContext, name As String, values As RouteValueDictionary) As VirtualPathData

Parameters

requestContext
RequestContext

An object that encapsulates information about the requested route.

name
String

The name of the route to use when information about the URL path is retrieved.

values
RouteValueDictionary

An object that contains the parameters for a route.

Returns

An object that contains information about the URL path that is associated with the route.

Exceptions

No route could be found that has the name specified in the name parameter.

See also

Applies to