How can this be done? Does this exclude the UpdatePanel functionality when it’s done?
How can this be done? Does this exclude the UpdatePanel functionality when it’s done?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The reason that it supports only static methods is that no page is instantiated. This means that there is no page instance, so of course instance methods cannot be called. This also means that UpdatePanel functionality does not run when you do this.
A workaround is that within your static method you can instantiate the page itself and then do whatever you want. However, keep in mind that things like the page lifecycle won’t run.
To get the current context you can use
HttpContext.Current, which is a static property. Once you have that you can access things like session or profile and get information about the state of the site.If you tell us more about your scenario there might be a better solution.