HTTPWebRequest - Programatically Uploading Text File with POST



I need to programatically upload a text file to a web server using the
HTTPWebRequest object within .Net 2.0.

So far, I have determined that:

- I need a HTTP content-type of "multipart/form-data".
- I need to use the ContentType.Boundary property.

That is about as far as I have gotten.

I have searched long and far for examples to do this in .Net but I can not
seem to find anything?

Does anyone have a code example or URL that I can look at to put the pieces
of the puzzle together?



I forgot to add that this must all be done programatically.

No user interface, no client.

I retrieve the data that I want to upload programatically and I must somehow
create a HTTPWebRequest that will use a POST request and the
"multipart/form-data" content type.

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