<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="jquery-2.1.3.min.js" type="text/javascript"></script> <script type="text/javascript"> //JS working issue demo by click on link //Below code works every time function pageLoad(sender, args) { $('#hyplink').click(function (e) { alert('sdf'); }); } //Below code works only one time it's not worked after you click on Update Button //$(document).ready(function () { // $('#hyplink').click(function (e) { // alert('sdf'); // }); //}); </script> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="up1" runat="server"> <ContentTemplate> <asp:HyperLink ID="hyplink" runat="server" ClientIDMode="Static" Text="">Click On Link</asp:HyperLink> <asp:Button ID="btnTest" runat="server" Text="Update" OnClientClick="" /> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html>
$(document).ready(function (){ //..... });
function pageLoad(sender, args) { //put your code here.... }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)