Share via


RouteCollectionExtensions.EnableFriendlyUrls Method (RouteCollection, FriendlyUrlSettings, IFriendlyUrlResolver[])

.NET Framework 4

Enables friendly URLs using the passed resolvers.

Namespace:  Microsoft.AspNet.FriendlyUrls
Assembly:  Microsoft.AspNet.FriendlyUrls (in Microsoft.AspNet.FriendlyUrls.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub EnableFriendlyUrls ( _
    routes As RouteCollection, _
    settings As FriendlyUrlSettings, _
    ParamArray resolvers As IFriendlyUrlResolver() _
)
'Usage
Dim routes As RouteCollection 
Dim settings As FriendlyUrlSettings 
Dim resolvers As IFriendlyUrlResolver()

routes.EnableFriendlyUrls(settings, _
    resolvers)
public static void EnableFriendlyUrls(
    this RouteCollection routes,
    FriendlyUrlSettings settings,
    params IFriendlyUrlResolver[] resolvers
)
[ExtensionAttribute]
public:
static void EnableFriendlyUrls(
    RouteCollection^ routes, 
    FriendlyUrlSettings^ settings, 
    ... array<IFriendlyUrlResolver^>^ resolvers
)
static member EnableFriendlyUrls : 
        routes:RouteCollection * 
        settings:FriendlyUrlSettings * 
        resolvers:IFriendlyUrlResolver[] -> unit
public static function EnableFriendlyUrls(
    routes : RouteCollection, 
    settings : FriendlyUrlSettings, 
    ... resolvers : IFriendlyUrlResolver[]
)

Parameters

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.100) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.100).

See Also

Reference

RouteCollectionExtensions Class

EnableFriendlyUrls Overload

Microsoft.AspNet.FriendlyUrls Namespace