[This is preliminary documentation and is subject to change.]

Gets the content type from a file extension.

Namespace: Simple.WebSimple.WebSimple::Web
Assembly: Simple.Web (in Simple.Web.dll)

Syntax

C#

string GetMediaTypeFromFileExtension(

string file,

IList<string> acceptedTypes

)

VB

Function GetMediaTypeFromFileExtension( _

file As String, _

acceptedTypes As IList(Of String) _

) As String

C++

String^ GetMediaTypeFromFileExtension(

String^ file,

IList<String^>^ acceptedTypes

)

Parameters

Return Value

Type: System.StringSystem.StringSystem::String
The acceptable type for the file.

See Also

IWebEnvironmentIWebEnvironmentIWebEnvironment Interface
Simple.WebSimple.WebSimple::Web Namespace