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

HttpRequest.ContentLength Property

Specifies the length, in bytes, of content sent by the client.

[Visual Basic]
Public ReadOnly Property ContentLength As Integer
public int ContentLength {get;}
public: __property int get_ContentLength();
public function get ContentLength() : int;

Property Value

The length of content sent by the client.


The following example assigns the value representing the content length of the incoming request to an integer variable.

[Visual Basic] 
Dim len As Integer
len = Request.ContentLength

int len;
len = Request.ContentLength;

int len;
len = Request->ContentLength;

var len : int = Request.ContentLength


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

© 2015 Microsoft