Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ContentLength Property
Collapse the table of content
Expand the table of content

HttpPostedFile.ContentLength Property

Gets the size of an uploaded file, in bytes.

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

public int ContentLength { get; }

Property Value

Type: System.Int32
The file length, in bytes.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
© 2015 Microsoft