javascript - Jquery server control click event is not firing -


there server control button on web form, inside updatepanel control.

<asp:button runat="server" text="save details" id="btnsave" width="130px"  clientidmode="static"></asp:button> 

script in external file.

$(document).ready(function () { $('<%= btnsave.clientid %>').click(function () {          alert('msg');     }); }); 

all other scripts running fine 1 not firing.

you're missing # selector:

$(document).ready(function () {     $('#<%= btnsave.clientid %>').click(function () { //     ^ add # here         alert('msg');     }); }); 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -