asp.net.ph

HttpPostedFile.ContentLength Property

System.Web Namespace   HttpPostedFile Class


Gets the size in bytes of an uploaded file.

[ VB ]
Public ReadOnly Property ContentLength As Integer

[ C# ]
public int ContentLength {get;}

[ C++ ]
public: __property int get_ContentLength ( );

[ JScript ]
public function get ContentLength ( ) : int;

Property Value

The length of the file.

Example

The following example shows the simplest way to retrieve and display the ContentLength property of an uploaded file. In the sample, an HtmlInputFile control named myUploader is used to enable selection of a file from the client's machine.

myUploader.PostedFile.ContentLength

 Show me 

See Also

HttpPostedFile Members   HttpFileCollection Class Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph