Export (0) Print
Expand All

HttpRequest.ContentLength Property

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

[Visual Basic]
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 content sent by the client.

Example

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
   

[C#] 
int len;
len = Request.ContentLength;
   

[C++] 
int len;
len = Request->ContentLength;
   

[JScript] 
var len : int = Request.ContentLength
   

Requirements

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

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

Show:
© 2014 Microsoft