I have a bunch of variables (properties of an object) stored in the Session,
and need to send them to another Web site via an HTTP POST.
The receiving site is expecting the name/values pairs in an HTML <FORM>. The
documentation for the receiving site assumes a page is being POSTed - but it
only really cares about the FORM being received in the POST.
I was thinking I could simply build the <FORM> as a string that then gets
sent via the POST. I would like to do this work (build the string and send
via POST) from a static class.
I can build the string - but how can I POST to the other Web site? I've seen
the WebClient object in .NET - but don't know if that's suitable for my
purposes or if there are alternatives I should consider.
Any perspective on the WebClient class or alternatives for how to accomplish
this are appreciated.