aspxtreme

HttpPostedFile.ContentType Property

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;

Property Value

The MIME content type of the uploaded file.

Example

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 

See Also

HttpPostedFile Members   HttpFileCollection Class



Books and more ...


Suggested Reading

Need a break ?



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme