Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>They are essentially the same. <strong>Both</strong>:</p> <ol> <li><strong>Setup a webservice</strong> for you that the javascript for the control can call.</li> <li><strong>Provide asynchronous respons</strong>e without involving the page lifecycle.</li> </ol> <p>They are different:</p> <ol> <li><strong>Page Methods simply require that you decorate a static method</strong> with an attribute and you are done. The rest of the magic is handled by HTTP Handlers and Modules. <strong>Callbacks require you implement a few interfaces and handle the async event handlers</strong> yourself. I find them to be a little more of a pain.</li> <li><strong>Callbacks only work with certain controls</strong>. Calling page methods allows you to affect any control through custom javascript. Callbacks have a slight advantage here in that the client-side behavior is already written and fixed. With <strong>page methods you have more flexibility</strong>, though (the behavior on the client side is determined by you).</li> </ol> <p>There are a few other differences, but these are the basics. My understanding is that client callbacks tend to perform as well as Page methods, but are not used as much becuase they are only available in certain situations, whereas a Page Method is always a valid avenue.</p> <p>As for the <strong>ScriptManager vs. JQuery question, my feeling here is it's about taste</strong> more than anything. I like JQuery's syntax and I feel like it performs better, but in the grand scheme of things the most expensive thing is the XmlHttpRequest... after that the execution of the javascript is likely to be insignificant in difference next to that.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload