title: Post multiple files and form values using .NET (console application)
body: <p>I want to POST multiple files and form variables to a CGI script, all in <em>one</em> HTTP request. I believe this requires a HTTP post with <code>multipart/form-data</code> encoding. Here is a sample HTML form that sends the required information; I need to send the same information through the application:</p>
  
  <pre><code>&lt;form action="/process.php" enctype="multipart/form-data" method="post"&gt;
  &lt;input type="text" name="foo" value="bar"&gt;
  &lt;input type="text" name="blah" value="baz"&gt;
  &lt;input type="file" name="file1"&gt;
  &lt;input type="file" name="file2"&gt;
  &lt;input type="file" name="file3"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Please note that the application is a C# .NET GUI (or console) application, not an ASP.Net application.</p>