RouteCollection.GetVirtualPath RouteCollection.GetVirtualPath RouteCollection.GetVirtualPath Method

Definition

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

Overloads

GetVirtualPath(RequestContext, RouteValueDictionary) GetVirtualPath(RequestContext, RouteValueDictionary) 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) GetVirtualPath(RequestContext, String, RouteValueDictionary) 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) GetVirtualPath(RequestContext, RouteValueDictionary) 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
Parameters
requestContext
RequestContext RequestContext RequestContext

An object that encapsulates information about the requested route.

values
RouteValueDictionary RouteValueDictionary 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.

GetVirtualPath(RequestContext, String, RouteValueDictionary) GetVirtualPath(RequestContext, String, RouteValueDictionary) 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
Parameters
requestContext
RequestContext RequestContext RequestContext

An object that encapsulates information about the requested route.

name
String String String

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

values
RouteValueDictionary RouteValueDictionary 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.

Applies to