title: Response.Redirect with headers
body: <p>I'm trying to set the headers and redirecting to a different page like this - </p>
  
  <pre><code>Response.Headers.Add("id", "testtest");
  Response.Redirect("http://www.somesite.com/somepage.aspx");
  </code></pre>
  
  <p>And in the <code>page_load</code> of somepage.aspx, I'm checking the request for headers - </p>
  
  <pre><code>if (!string.IsNullOrEmpty(Request["id"]))
  {
     // do something with "id"
  }
  </code></pre>
  
  <p>But <code>Request["id"</code>] is always null. How do I get the values of the header in the new page? I do not want to use query strings. </p>
  
  <p>Thanks!</p>
  
  <p>Update:</p>
  
  <p>Here's a little more detail -- I have two ASP.NET v4 web applications (Site 1 and Site 2) running on two different machines. Site 1 has just one aspx form and it has only one button on it. On button click, I hit the database and get the value I need and should pass it on to Site 2. In the Global.asax of Site 2, I'll be reading the header information received from Site 1 and use the value.</p>
  
  <p>Update #2:</p>
  
  <p>I was able to get it to work --</p>
  
  <pre><code> Response.Write(
                      string.Format(
                          @"&lt;form action='{0}' id='test' method='POST'&gt;&lt;input type='hidden' name='key' value={1} /&gt;&lt;/form&gt;
                    &lt;script type='text/javascript'&gt;
                       document.getElementById('test').submit();
                    &lt;/script&gt; ",
                          "http://www.somesite.com", "1234"));
  </code></pre>
  
  <p>In the destination site, I was able to get the value using -</p>
  
  <pre><code>Request["key"]
  </code></pre>