Hi!
I am a bit lost. I want to upload multiple files and key-value pairs via
HTTP post.
A single file and a single collection of key-value pairs is easy. You just
have to use the System.Net.WebClient class and its UploadFile, UploadValues
method.
Can anyone explain to me how to post both files and values with one request?
I would very much appreciate any hint!
RobinS - 24 Apr 2007 06:56 GMT
Hey, Lloyd, this is a pretty inactive group. You might try posting to the
C# or VB group. (microsoft.public.dotnet.languages.csharp and the same
with vb instead of csharp -- haven't I seen you there?)
Robin S.
-----------------------
> Hi!
>
[quoted text clipped - 7 lines]
> Can anyone explain to me how to post both files and values with one
> request? I would very much appreciate any hint!
RobinS - 24 Apr 2007 06:57 GMT
Oh! I didn't realize you cross-posted it. Never mind!
Robin
-------------------------
> Hey, Lloyd, this is a pretty inactive group. You might try posting to the
> C# or VB group. (microsoft.public.dotnet.languages.csharp and the same
[quoted text clipped - 13 lines]
>> Can anyone explain to me how to post both files and values with one
>> request? I would very much appreciate any hint!
Rick Strahl [MVP] - 28 Apr 2007 04:40 GMT
If you need to post data to the server it might be easier to use
HttpWebRequest. I wrote an article and a wrapper class that handles these
aspects easily here a few years back:
http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm
You can use AddPostFile and AddPostKey in combination with the class to
upload files and form vars.
+++ Rick ---

Signature
Rick Strahl
West Wind Technologies
www.west-wind.com/weblog
> Hi!
>
[quoted text clipped - 7 lines]
> Can anyone explain to me how to post both files and values with one
> request? I would very much appreciate any hint!