HttpRequestExtensions.GetFriendlyUrlFileExtension Method (HttpRequest)
.NET Framework 4
Returns the extension of the file Friendly URLs mapped this request to.
Namespace: Microsoft.AspNet.FriendlyUrls
Assembly: Microsoft.AspNet.FriendlyUrls (in Microsoft.AspNet.FriendlyUrls.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetFriendlyUrlFileExtension ( _
httpRequest As HttpRequest _
) As String
'Usage
Dim httpRequest As HttpRequest
Dim returnValue As String
returnValue = httpRequest.GetFriendlyUrlFileExtension()
public static string GetFriendlyUrlFileExtension(
this HttpRequest httpRequest
)
[ExtensionAttribute]
public:
static String^ GetFriendlyUrlFileExtension(
HttpRequest^ httpRequest
)
static member GetFriendlyUrlFileExtension :
httpRequest:HttpRequest -> string
public static function GetFriendlyUrlFileExtension(
httpRequest : HttpRequest
) : String
Parameters
- httpRequest
Type: System.Web.HttpRequest
The HttpRequest object.
Return Value
Type: System.String
The file extension, e.g. .aspx.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HttpRequest. 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).