title: How to fill forms and submit with Webclient in C#
body: <p>I'm new at using the the libraries WebClient, HttpResponse and HttpRequest in C#, so bear with me, if my question is confusing to read.</p>
  
  <p>I need to build a WinForm based on C# which can open a URL, which is secured with the basic authorization. I did this with adding this to the header, like this:</p>
  
  <pre><code>using (WebClient wc = new WebClient())
  {
      wc.Headers.Add(HttpRequestHeader.Authorization, "Basic " +
      Convert.ToBase64String(
      Encoding.ASCII.GetBytes(username + ":" + password)));
  }
  </code></pre>
  
  <p>So far, so good! Now I would like to fill a form with a number, and I find the source-code from the site, and discover that the name is "number". So I write this:</p>
  
  <pre><code>NameValueCollection formData = new NameValueCollection();  
  formData["number"] = number
  byte[] responseBytes = wc.UploadValues(theurl, "POST", formData);
  string response = Encoding.ASCII.GetString(responseBytes);
  textBox_HTML.Text = response; 
  </code></pre>
  
  <p>But how do I submit this? I will like to receive my "search-results"...</p>