c# - PageMethod reload page -


Hello I'll call Stumbleupon from JS. PageMethod Send some information to the email when I call it, the page reloads. How to stop reloading the page during pagmoth and do it in AJAX style?

Thank you.

To prevent you from posting a page back, you might see the at the end of your Javascript call Return false; to add.

Like this:

  & lt; ASP: Button ID = "Button 1" runat = "server" text = "call page page" OnClientClick = "return fun ()" />  

Then in JS:

  Function () {PageMethods.MyPageMethod (Successful, On Error); return false; } Succeed on function (result) {warning (result); } Function on error (results) {}  

Comments