System.Web Namespace HttpPostedFile Class
Gets the MIME content type of a file sent by a client.
[ VB ]
Public ReadOnly Property ContentType As String
[ C# ]
public string ContentType {get;}
[ C++ ]
public: __property String* get_ContentType ( );
[ JScript ]
public function get ContentType ( ) : String;
The MIME content type of the uploaded file.
The following example shows the simplest way to retrieve and display the ContentType property of an uploaded file. In the sample, an HtmlInputFile control named myUploader is used to enable selection of a file from the client's machine.
myUploader.PostedFile.ContentType
Show me
HttpPostedFile Members HttpFileCollection Class