Neoret,
If it wasn't for #2, you could actually use WebClient for all of this.
If you are going to use HttpWebRequest, then you will have to handle all
of the uploading code yourself, meaning, you have to write the name/value
pairs, the boundaries, the content length, etc, etc.
All in all, it's quite a task.
I would look at the HTTP specification for how to do this, either that,
or dig through the WebClient class with reflector and find out how they are
doing it for the UploadValues and UploadFile method and do it yourself.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
<ne****@gmail.com> wrote in message
news:11*********************@j73g2000cwa.googlegro ups.com...
Hi there.
I need to perform an upload of a document using HTTP post. This has to
be done from my windows form using C#.
My challenge is:
1: To send - the word document
2: To attach several variables to the same request
3: To handle the response.
4: To authenticate my request by adding a username and pasword.
I found out that the webclient isn't complex enough. I guess I have to
use the httpWebrequest.
Thank you in advance for your contribution!!
Neoret