Share via


FriendlyUrlResolver.ConvertToFriendlyUrl Method

.NET Framework 4.5

Converts a typical 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
Public Overridable Function ConvertToFriendlyUrl ( _
    path As String _
) As String
'Usage
Dim instance As FriendlyUrlResolver 
Dim path As String 
Dim returnValue As String 

returnValue = instance.ConvertToFriendlyUrl(path)
public virtual string ConvertToFriendlyUrl(
    string path
)
public:
virtual String^ ConvertToFriendlyUrl(
    String^ path
)
abstract ConvertToFriendlyUrl : 
        path:string -> string  
override ConvertToFriendlyUrl : 
        path:string -> string
public 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.

Implements

IFriendlyUrlResolver.ConvertToFriendlyUrl(String)

See Also

Reference

FriendlyUrlResolver Class

Microsoft.AspNet.FriendlyUrls.Resolvers Namespace