Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2007

Tip: Looking for answers? Try searching our database.

how to HTTP post multiple files and key-value pairs?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lloyd Dupont - 23 Apr 2007 08:33 GMT
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!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.