IFriendlyUrlResolver.ConvertToFriendlyUrl Method

.NET Framework 4

Converts a URL with a file extension into a friendly extension-less URL.

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

Syntax

'Declaration
Function ConvertToFriendlyUrl ( _
    path As String _
) As String
'Usage
Dim instance As IFriendlyUrlResolver 
Dim path As String 
Dim returnValue As String 

returnValue = instance.ConvertToFriendlyUrl(path)
string ConvertToFriendlyUrl(
    string path
)
String^ ConvertToFriendlyUrl(
    String^ path
)
abstract ConvertToFriendlyUrl : 
        path:string -> string
function ConvertToFriendlyUrl(
    path : String
) : String

Parameters

  • path
    Type: System.String
    The original path, including the file extension.

Return Value

Type: System.String
The friendly URL (extension stripped) if this resolver can automatically map extensionless URLs to physical files with the provided extension. Otherwise, null.

See Also

Reference

IFriendlyUrlResolver Interface

Microsoft.AspNet.FriendlyUrls.Resolvers Namespace