HttpRequest.InputStream Property
.NET Framework 2.0
Gets the contents of the incoming HTTP entity body.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The following code example copies the contents of an InputStream into a string.
var str : Stream var sb : StringBuilder = new StringBuilder() var strmContents : String var strLen, strRead : int str = Request.InputStream // Create a Stream object. strLen = str.Length // Find number of Bytes in stream. var strArr: Byte[] = new Byte[strLen] // Create a Byte array. strRead = str.Read(strArr,0,strLen) // Read stream into Byte array. // Convert Byte array to a text string. for(var counter=0; counter < strLen; counter++){ sb.Append(strArr[counter].ToString()) } strmContents = sb.ToString();
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
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.