Gets or sets the Content-Length header of the request.
[Visual Basic] Overridable Public Property ContentLength As Long [C#] public long ContentLength {override get; override set;} [C++] public: __property virtual __int64 get_ContentLength(); public: __property virtual void set_ContentLength(__int64); [JScript] public function get ContentLength() : long; public function set ContentLength(long);
Exception Type | Condition |
---|---|
InvalidOperationException | Data has already been written to the request stream. |
ArgumentOutOfRangeException | The new ContentLength value is less than 0. |
HttpWebRequest Class | HttpWebRequest Members | System.Net Namespace