Share via


WebPageHttpHandler.RegisterExtension Method

Adds a file name extension to the list of extensions that are processed by the current WebPageHttpHandler instance.

Namespace:  System.Web.WebPages
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public Shared Sub RegisterExtension ( _
    extension As String _
)
'Usage
Dim extension As String 

WebPageHttpHandler.RegisterExtension(extension)
public static void RegisterExtension(
    string extension
)
public:
static void RegisterExtension(
    String^ extension
)
static member RegisterExtension : 
        extension:string -> unit
public static function RegisterExtension(
    extension : String
)

Parameters

  • extension
    Type: System.String
    The extension to add, without a leading period.

Remarks

File-name extensions are stored without the leading period (for example, "jpg" instead of ".jpg"). Extensions are not case sensitive, so the file MyImage.JPG will be processed by the handler for "jpg".

See Also

Reference

WebPageHttpHandler Class

System.Web.WebPages Namespace