RouteCollectionExtensions.EnableFriendlyUrls Method (RouteCollection, FriendlyUrlSettings)
.NET Framework 4
Enables friendly URLs for Web Forms pages.
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 _
)
'Usage
Dim routes As RouteCollection
Dim settings As FriendlyUrlSettings
routes.EnableFriendlyUrls(settings)
public static void EnableFriendlyUrls(
this RouteCollection routes,
FriendlyUrlSettings settings
)
[ExtensionAttribute]
public:
static void EnableFriendlyUrls(
RouteCollection^ routes,
FriendlyUrlSettings^ settings
)
static member EnableFriendlyUrls :
routes:RouteCollection *
settings:FriendlyUrlSettings -> unit
public static function EnableFriendlyUrls(
routes : RouteCollection,
settings : FriendlyUrlSettings
)
Parameters
- routes
Type: System.Web.Routing.RouteCollection
The routes collection.
- settings
Type: Microsoft.AspNet.FriendlyUrls.FriendlyUrlSettings
The settings to use when enabling Friendly Urls.
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).