Simple data retrieval question

  • Thread starter Thread starter Larry Smith
  • Start date Start date
L

Larry Smith

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.
 
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()" inmy
"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
 
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
 
Back
Top