How to access page controls inside a static web method? [duplicate]

As mentioned by @Tim Schmelter This doesn’t answer this question because you can’t access page’s controls from a webmethod. Please go through asp.net access a control from static function The whole point of [WebMethod]s is that they don’t run the ASP.Net page lifecycle. This way, they’re fast and parallelizable. Your controls don’t exist. your question … Read more

Pagemethods in asp.net

This should work in all browsers by following the steps below: The page method must have the System.Web.Services.WebMethod attribute. [WebMethod] The page method must be public. [WebMethod] public … The page method must be static. [WebMethod] public static … The page method must be defined on the page (either inline or in the code-behind). It … Read more