HttpRequest.TotalBytes Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar antalet byte i den aktuella indataströmmen.
public:
property int TotalBytes { int get(); };
public int TotalBytes { get; }
member this.TotalBytes : int
Public ReadOnly Property TotalBytes As Integer
Egenskapsvärde
Antalet byte i indataströmmen.
Exempel
Följande kodexempel avgör om TotalBytes egenskapsvärdet är större än 1 000 byte och skriver informationen till en fil.
// 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");
}
' 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