Solved

ASP.NET Getting the Current Page's Control from a Static Member

Posted on 2011-09-22
2
268 Views
Last Modified: 2012-08-13
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?
Thank you.


   
0
Comment
Question by:Mare22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 12

Accepted Solution

by:
jagssidurala earned 500 total points
ID: 36582682
you need pass a parameter to your ajax webmethod in jquery call as we can not access controls in ajax page methods
0
 
LVL 12

Assisted Solution

by:jagssidurala
jagssidurala earned 500 total points
ID: 36582730
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question