This does not mean calling a simple pagemethod. Because the static method cannot operate the control of the current page, the static pagemethod function is the same as that of a common WebService and is quite limited.
Therefore, calling a common server method is actually initiating an asynchronous callback. The simplest implementation method is through updatepanel.
First, define a hidden linkbutton. In the event processing process, call the operation we want to perform: <asp: linkbutton id = "linkupdateposts" runat = "server" style = "display: 'none'; "onclick =" linkupdateposts_clicked "/>
// Refresh the post list (called by the client JS)
Protected void linkupdateposts_clicked (Object sender, eventargs E)
{
Loadposts ();
}
Then, you can define a function in JavaScript to trigger the callback of this linkbutton: // refresh the post list.
Function refreshposts (){
_ Dopostback ('<% = linkupdateposts. uniqueid %> ','');
}