asp.net.ph

Request.InputStream Property

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;

Property Value

A Stream object representing the contents of the incoming HTTP content body.

Example

[ 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
See Also

HttpRequest Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph