Used to be a Web project to develop the Web site, in a number of places to use pagemethods, can be said to be familiar. This time I would like to try the Web site method, because the code changes do not compile, refresh the page will be able to see the effect, this is more convenient.
But when I used pagemethods, I got into trouble. Add the ScriptManager, add the [WebMethod] feature to the static method, but the page output just can't see the ScriptManager: ( I think it's a problem with. NET 3.5 or vs2008, Google has no answer. Also suspected that the site is a handlers or cause errors, re-examine, and remove all handlers test, the result is not.
When you're about to crash, notice a problem, the example given in MSDN is in an ASPX file, and my code is in the CodeFile, is this a problem? Move your static code to the ASPX file, refresh the page, pagemethods it out!!!
You almost hit the computer.
Why is there such a limit? Why do you want pagemethods in an ASPX file to be effective ....
Scriptmanager.enablepagemethods= "true"
static method definition
JS calls the method.