Using Response.Redirect() to a relative path
<p>I'm working with ASP.net. My website is hosted within a subfolder <code>test</code> under the IIS root directory. So the url of default.aspx is <code>http://localhost/test/Default.aspx</code>. From default.aspx, I want to use <code>Reponse.Redirect()</code> with a relative path to redirect to another url within the same web site, <code>http://localhost/test/whatever</code>.</p>

<p>I tried </p>

<pre><code>Response.Redirect("/whatever");
</code></pre>

<p>and </p>

<pre><code>Response.Redirect("~/whatever");
</code></pre>

<p>Both of them redirect to <code>http://localhost/whatever</code>. Note that the <code>Redirect</code> method use  <code>http://localhost</code> instead of <code>http://localhost/test/</code> as the base url. </p>

<p>Any ideas?</p>

<p>Thanks.</p>
