UploadedFileContentType Property |
Gets the MIME content type of a file sent by a client.
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax public abstract string ContentType { get; }
Public MustOverride ReadOnly Property ContentType As String
Get
public:
virtual property String^ ContentType {
String^ get () abstract;
}
abstract ContentType : string with get
Property Value
Type:
StringThe 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 .
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
UploadedFileCollection MyFileCollection = KaxUpload1.UploadedFiles;
for (int Loop1 = 0; Loop1 < MyFileCollection.Count; Loop1++)
{
if (MyFileCollection[Loop1].ContentType == "video/mpeg")
{
}
}
See Also