title: How to handle C# .NET GET / POST?
body: <p>As I'm new to .NET after coming from PHP I chose C# to work with and its coming along nicely.
  I have a question though regarding the handling of GET and POST.</p>
  
  <p>So far I've established that I can put this in the codefile behind the aspx page:</p>
  
  <pre><code>if (Request.HttpMethod.ToString() == "POST") {
  
      Response.Write("You sent a post!")
  
  }
  </code></pre>
  
  <p>and I could and an ELSE there to handle a GET, but how exactly would you do that?</p>
  
  <p>In PHP I would do something like this:</p>
  
  <p>Example URL = <a href="http://www.example.com/page.php?foo=bar" rel="noreferrer">http://www.example.com/page.php?foo=bar</a></p>
  
  <pre><code>$foobar = $_GET['foo'];
  </code></pre>
  
  <p>Could some kind soul please give me pointers on dealing with this in C#.</p>
  
  <p>Thanks</p>