System.Web Namespace HttpRequest Class
Gets the contents of the incoming HTTP entity body.
[ VB ]
Public ReadOnly Property InputStream As Stream
[ C# ]
public Stream InputStream {get;}
[ C++ ]
public: __property Stream* get_InputStream ( );
[ JScript ]
public function get InputStream ( ) : Stream;
A Stream object representing the contents of the incoming HTTP content body.
[ VB ] This example copies the contents of an InputStream into a string.
Dim str As Stream, strmContents As String
Dim counter, strLen, strRead As Integer
sub Page_Load ( )
' Create a Stream object.
str = Request.InputStream
' Find number of Bytes in stream.
strLen = CInt ( str.Length )
' Create a Byte array.
Dim strArr ( strLen ) As Byte
' Read stream into Byte array.
strRead = str.Read ( strArr,0,strLen )
' Convert Byte array to a text string.
For counter = 0 To strLen-1
strmContents = strmContents & strArr ( counter ).ToString ( )
Next counter
HttpRequest Members