Compartilhar via


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)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetVirtualPathForArea ( _
    routes As RouteCollection, _
    requestContext As RequestContext, _
    values As RouteValueDictionary _
) As VirtualPathData
public static VirtualPathData GetVirtualPathForArea(
    this RouteCollection routes,
    RequestContext requestContext,
    RouteValueDictionary values
)
[ExtensionAttribute]
public:
static VirtualPathData^ GetVirtualPathForArea(
    RouteCollection^ routes, 
    RequestContext^ requestContext, 
    RouteValueDictionary^ values
)

Parameters

Return Value

Type: System.Web.Routing.VirtualPathData
An 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 Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The information that is returned includes data tokens, the route, and the virtual path.

See Also

Reference

RouteCollectionExtensions Class

GetVirtualPathForArea Overload

System.Web.Mvc Namespace