HttpPostedFile.ContentType Property

 

Gets the MIME content type of a file sent by a client.

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

member ContentType : string with get

Property Value

Type: System.String

The MIME content type of the uploaded file.

The following code example shows how to loop through all the files in the uploaded file collection and take action when the MIME type of a file is US-ASCII.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: