From: Larry Smith on
Hi there,

Can anyone post a very trivial example (or direct me to a link) that
demonstrates how to retrieve the data sent by "WebClient.UploadData()" in my
"Page_Load()" handler (in my case I'm sending two values, one a "bool" and
the other a "byte[]" array of arbitrary size). Thanks very much.
From: Alexey Smirnov on
On Feb 17, 8:41 pm, Larry Smith <LarrySm...(a)discussions.microsoft.com>
wrote:
> Hi there,
>
> Can anyone post a very trivial example (or direct me to a link) that
> demonstrates how to retrieve the data sent by "WebClient.UploadData()" in my
> "Page_Load()" handler (in my case I'm sending two values, one a "bool" and
> the other a "byte[]" array of arbitrary size). Thanks very much.

Larry,

you can check the example on MSDN
http://msdn.microsoft.com/en-us/library/system.net.webclient.uploaddata.aspx

It retrieves byteArray[]

Hope this helps
From: Larry Smith on
> Larry,
>
> you can check the example on MSDN
> http://msdn.microsoft.com/en-us/library/system.net.webclient.uploaddata.aspx
>
> It retrieves byteArray[]
>
> Hope this helps

Thanks for the reply. Actually, I'm trying to figure out how to read this
data from my Page_Load handler (on the server side). Probably wasn't clear
enough in in my first post.
From: Alexey Smirnov on
On Feb 18, 2:32 pm, Larry Smith <LarrySm...(a)discussions.microsoft.com>
wrote:
> > Larry,
>
> > you can check the example on MSDN
> >http://msdn.microsoft.com/en-us/library/system.net.webclient.uploadda...
>
> > It retrieves byteArray[]
>
> > Hope this helps
>
> Thanks for the reply. Actually, I'm trying to figure out how to read this
> data from my Page_Load handler (on the server side). Probably wasn't clear
> enough in in my first post.

Ah, okay then you need to look at the HttpContext.Request

e.g. to save files you can use something like this

Dim f As String
Dim file

For Each f In context.Request.Files.AllKeys
file = context.Request.Files(f)
file.SaveAs("c:\web\" & file.FileName)
Next f

Hope this helps