HttpRequest.ContentLength 屬性

定義

指定用戶端送出的內容長度,以位元組為單位。

public:
 property int ContentLength { int get(); };
public int ContentLength { get; }
member this.ContentLength : int
Public ReadOnly Property ContentLength As Integer

屬性值

用戶端所送出的內容長度 (以位元組為單位)。

範例

下列程式碼範例會將代表傳入要求內容長度的值指派給整數變數。

int len;
len = Request.ContentLength;

Dim len As Integer
len = Request.ContentLength
   

適用於