Simple data retrieval question

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.
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,099
Messages
2,570,626
Members
47,237
Latest member
David123

Latest Threads

Top