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
Post a Comment