title: C# - How to Submit 2 Different Forms and Download a PDF File
body: <p>I am trying to submit a form (via WebClient - C# WindowsForms) but I do not get it yet.</p>
  
  <p>My HTTP page sequence is: Username_Form > Password_Form > Download PDF File</p>
  
  <pre><code>&lt;!-- Username_Form.html --&gt;
  &lt;form ... action="/AgenciaWeb/autenticar/autenticar.do"&gt;
      &lt;input type="text" name="username" /&gt;
      &lt;input type="submit" value="Continue" /&gt;
  &lt;/form&gt;
  
  &lt;!-- Password_Form.html --&gt;
  &lt;form ... action="/AgenciaWeb/autenticar/validarSenha.do"&gt;
      &lt;input type="password" name="password" /&gt;
      &lt;input type="submit" value="Login" /&gt;
  &lt;/form&gt;
  
  &lt;!-- Password_Form.html --&gt;
  &lt;div&gt;
      &lt;a href="PDF_download.pdf"&gt;Download&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So I should fill all forms in the first page to be redirected to second page to also fill all forms and then to get the final page and start to download my PDF File.</p>
  
  <p>The problem is that I am not getting the submit in the first page. I am doing:</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
          {
              var url = "http://test_something.com:8080/AgenciaWeb/autenticar/autenticar.do";
  
              using (var client = new WebClient())
              {
                  var values = new NameValueCollection();
                  values["username"] = "user01";
  
                  var response = client.UploadValues(url, "POST", values);
  
                  var responseString = Encoding.Default.GetString(response);
  
                  Console.WriteLine(responseString);
              }
  
          }
  </code></pre>
  
  <p>However my 'responseString' is the exactly same page with all forms filled (<strong>input type="text" name="username" value="user01"</strong>) and the submit does not happen, like I can not see or interact with the second page (<strong>Password_Form.html</strong>).</p>
  
  <p>Is there something wrong that I am missing?</p>