i am doing async postback using updatepanel. after async postback button is click two times.I dont know why I’m using jQuery to wire up some mouseover effects on elements that are inside an UpdatePanel. The events are bound in $(document).ready
<script type="text/javascript">
window.onload = body_load;
function body_load()
{
BindEvents();
}
function BindEvents()
{
$(function ()
{$(".csstablelisttd").mousedown(function (e)
{//mouse down code});
$("#contentPlaceHolderMain_btnFix").click(function (e)
{alert("Alert");//here alert is generate two times an then postback occurs
//btn click code
}
}
}
</script>
<asp:UpdatePanel ID="updatePanelTableAppointment" runat="server">
<ContentTemplate>
<table id="table" runat="server">
//table data
</table>
<script type="text/javascript">Sys.Application.add_init(body_load);
</script>
</ContentTemplate><Triggers>
<asp:AsyncPostBackTrigger ControlID="btnFix" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
you are calling
body_loadtwo timeshere
and here
which cause it to click two times