c# - Call jquery button click event from code behind -


i using below code display div on button click event. there way call button click event c# code behind.

 $(document).on("click", '#addnew', function (e) {                     e.stoppropagation();                     if ($newentry.is(":hidden")) {                         $newentry.slidedown("slow", "easeoutbounce");                         $newentry.slidedown("slow", "easeoutbounce");                         $filter.slideup("slow");                         return false;                     } else {                         $newentry.slideup("slow");                         return false;                     }                 }); 

use code :

protected void mybutton(object sender, eventargs e) { scriptmanager.registerstartupscript(this.page, this.gettype(), "tmp", "<script type='text/javascript'>myfunction(params...);</script>", false); } 

more read : call jquery function asp.net code behind c#


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -