PageRouteHandler.GetSubstitutedVirtualPath Method (RequestContext)

.NET Framework (current version)

Returns the virtual path of the physical file for the route after substitutions have been applied to any replacement parameters.

Namespace:   System.Web.Routing
Assembly:  System.Web (in System.Web.dll)

public string GetSubstitutedVirtualPath(
	RequestContext requestContext


Type: System.Web.Routing.RequestContext

An object that encapsulates information about the request.

Return Value

Type: System.String

The URL of the physical file that was generated from a route.

Exception Condition

The requestContext parameter is null.

If the VirtualPath value does not contain any replacement parameters, the GetSubstitutedVirtualPath method returns the same value as the VirtualPath property.

.NET Framework
Available since 4.0
Return to top