Click or drag to resize
UploadedFileContentLength Property
Gets the size in bytes of an uploaded file.

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 int ContentLength { get; }

Property Value

Type: Int32
The length of the file.
Examples
This example validates the file size of an uploaded file.
bool isValid = true;
if (file.ContentLength > MaxFileSize)
{
    isValid = false;
}
See Also