ASP.NET Getting the Current Page's Control from a Static Member
Posted on 2011-09-22
I am running ASP.NET 3.5. I am trying to use AJAX calls using JQuery, so I am making some non-static methods static so that I can call them through AJAX. One of them updates a drop-down list box on the client's current page. My understanding is that I would now first need to get the current page object from my static method and then get the control I need to update. The question is how can I get the current web page? I tried getting the page trhough HttpContext.Current.CurrentHandler and got null - since I am running a static method, perhaps this is expected?
The question is how I can get the current web page object from a static method?