Request param missing on POST
<p>I am re-writing an ASP.NET application and noticed a difference in behaviour ...</p>

<p>In my Page_Load event I have some code such as:</p>

<pre><code>string id = Request["id"]
</code></pre>

<p>which gets the id param from the URL. On page load (ie a HTTP GET), this works as expected in both versions. I also have a button onclick event handler. Clearly, this performs a POST to the server, and also invokes the Page_Load handler. The difference is, that in the original version of the app, the id is successfully loaded from the request. In the new version of the app, id comes back as null. I have discovered that I need to use Request.Params["id"] instead, but am totally puzzled as to why Request["id"] works for POST requests in one app but not the other.</p>

<p>The only difference between the apps is that the first was created as File -> New Website and the second File -> New Web Application. I think this is what is causing the difference in behaviour, but am wondering why this subtle difference, and also if there is anything else I should be aware of between the 2.</p>

<p>Any advice greatly appreciated.</p>
