Last post Sep 18, 2011 06:01 AM by thomas_msn01
Sep 17, 2011 02:47 PM|thomas_msn01|LINK
I would simply like to know if and how I can get the URL parameters in the C# code of a HttpHandler ?
On a web form I would have wrote
string myteststring = Request.QueryString["test"];
But I can't find the equivalent in the case of an HttpHandler.
Sep 17, 2011 06:10 PM|Mikesdotnetting|LINK
The Request collections are available within an HttpHandler via the HttpContext that gets passed into the ProcessRequest method:
public void ProcessRequest(HttpContext context)
string test = context.Request.QueryString["test"];
//test now equals "hello"
Sep 18, 2011 06:01 AM|thomas_msn01|LINK
Thank you. That was what I though in the first place ... but for some reason it did not work then, now it's ok.