Freigeben über


HttpRequest.TotalBytes-Eigenschaft

Ruft die Anzahl der Bytes im aktuellen Eingabestream ab.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

Syntax

'Declaration
Public ReadOnly Property TotalBytes As Integer
'Usage
Dim instance As HttpRequest
Dim value As Integer

value = instance.TotalBytes
public int TotalBytes { get; }
public:
property int TotalBytes {
    int get ();
}
/** @property */
public int get_TotalBytes ()
public function get TotalBytes () : int

Eigenschaftenwert

Die Anzahl der Bytes im Eingabestream.

Beispiel

Im folgenden Codebeispiel wird bestimmt, ob der TotalBytes-Eigenschaftenwert größer als 1000 Bytes ist, und schreibt diese Informationen in eine Datei.

' Write a message to the file dependent upon
' the value of the TotalBytes property.
If Request.TotalBytes > 1000 Then
    sw.WriteLine("The request is 1KB or greater")
Else
    sw.WriteLine("The request is less than 1KB")
End If
// Write a message to the file dependent upon
// the value of the TotalBytes property.
if (Request.TotalBytes > 1000)
{
    sw.WriteLine("The request is 1KB or greater");
}
else
{
    sw.WriteLine("The request is less than 1KB");
}

Plattformen

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

HttpRequest-Klasse
HttpRequest-Member
System.Web-Namespace