ASP.Net Using POST with Server.Execute
<p>I'm trying to do something like </p>

<pre><code>Server.Execute("page1.aspx");
</code></pre>

<p>but I need to pass POST data to this page.</p>

<p>Does anyone know how I can achieve this? Since Server.Execute only takes in 3 params, and none of these are anything to do with POST data.</p>

<p><strong>Solution: 7 Hours Later...</strong> </p>

<p>Unfortunately, the only way I was able to do this was to pass the parameters in the query string (using a GET request). I've searched the web for a while now, and finally felt this was good enough for my application. I tested, and somehow the GET URL size limit of 4K chars does not hold good in this context. </p>

<p>I was able to successfully execute a Server.Execute method with 640K+ chars to another page, and it worked beautifully.</p>

<pre><code>Server.Execute("~/pageB.aspx?foo=" + new string('x', 640000));
</code></pre>

<p>In pageB: Page_Load();</p>

<pre><code>Response.Write(Request["foo"].ToString().Length());
</code></pre>

<p>Result: 640000</p>

<p>So I guess this will have to do for now. </p>

<p>I was afraid of having to send large parameters in the query string, but since it works, who am I to complain! :)</p>
