Click or drag to resize
UploadedFileContentType Property
Gets the MIME content type of a file sent by a client.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public abstract string ContentType { get; }

Property Value

Type: String
The MIME content type of the uploaded file.
Examples
The following example loops through all the files in the uploaded files collection and takes action when the MIME type of a file is US-ASCII .
1
Dim Loop1 As Integer
 Dim MyFileCollection As UploadedFileCollection = KaxUpload1.UploadedFiles

 For Loop1 = 0 To MyFileCollection.Count - 1
    If MyFileCollection(Loop1).ContentType = "video/mpeg" Then
       '...
    End If
 Next Loop1
2
UploadedFileCollection MyFileCollection = KaxUpload1.UploadedFiles;

 for (int Loop1 = 0; Loop1 < MyFileCollection.Count; Loop1++)
 {
    if (MyFileCollection[Loop1].ContentType == "video/mpeg")
    {
       //...
    }
 }
See Also