I\'ve got a function on all pages in my site which is located in my master page and I want it to run from some jQuery Ajax method.
I\'ve got some code like this at t
Your webmethod code cannot reside in the codebehind for your master page.
I've found it easier to include an actual web service or WCF service in my project for things that I will need to call from multiple pages.
EDIT :
To add a WCF Service to your project:
More than a few examples here on the Stackoverflow...
Hope that helps.