RouteCollectionExtensions.GetVirtualPathForArea Method (RouteCollection, RequestContext, RouteValueDictionary)
Returns an object that contains information about the route and virtual path that are the result of generating a URL in the current area.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
'Declaration <ExtensionAttribute> _ Public Shared Function GetVirtualPathForArea ( _ routes As RouteCollection, _ requestContext As RequestContext, _ values As RouteValueDictionary _ ) As VirtualPathData 'Usage Dim routes As RouteCollection Dim requestContext As RequestContext Dim values As RouteValueDictionary Dim returnValue As VirtualPathData returnValue = routes.GetVirtualPathForArea(requestContext, _ values)
Parameters
- routes
- Type: System.Web.Routing.RouteCollection
An object that contains the routes for the applications.
- requestContext
- Type: System.Web.Routing.RequestContext
An object that encapsulates information about the requested route.
- values
- Type: System.Web.Routing.RouteValueDictionary
An object that contains the parameters for a route.
Return Value
Type: System.Web.Routing.VirtualPathDataAn object that contains information about the route and virtual path that are the result of generating a URL in the current area.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type RouteCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).
Show: