![Collapse image Collapse image](collapse_all.gif)
![Expand Image Expand Image](expand_all.gif)
![](collapse_all.gif)
![](expand_all.gif)
![](dropdown.gif)
![](dropdownHover.gif)
![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
![]() ![]() |
A Sandcastle Documented Class Library |
HtmlWeb..::..GetContentTypeForExtension Method |
HtmlWeb Class See Also Send Feedback |
Gets the MIME content type for a given path extension.
Namespace: HtmlAgilityPack
Assembly: HtmlAgilityPack (in HtmlAgilityPack.dll) Version: 1.4.0.0 (1.4.0.0)
Syntax
C# |
---|
public static string GetContentTypeForExtension( string extension, string def ) |
Visual Basic |
---|
Public Shared Function GetContentTypeForExtension ( _ extension As String, _ def As String _ ) As String |
Visual C++ |
---|
public: static String^ GetContentTypeForExtension( String^ extension, String^ def ) |
Parameters
- extension
- Type: System..::..String
The input path extension.
- def
- Type: System..::..String
The default content type to return if any error occurs.