Not able to get query string
<p>I am using the below code for setting URL in the current http context</p>

<pre><code>public HttpContext SetNewHttpContext(string uRL)
    {
        var httpRequest = new HttpRequest("", uRL, "");
        var httpResponse = new HttpResponse(new StringWriter());         
        return new HttpContext(httpRequest, httpResponse);
    }
</code></pre>

<p>Invoking it as under</p>

<pre><code>HttpContext.Current = SetNewHttpContext("http://root/test.aspx?userid=319279549&amp;name=xyz");

var val =  HttpContext.Current.Request.QueryString["userid"];
</code></pre>

<p>But i am not able to get the value of the querystring(userid here) and getting null.</p>

<p>Why?</p>

<p>Please help</p>
