I have code in my ASP page that looks like this:
<asp:UpdatePanel runat="server" id="updatepanel1" UpdateMode="Conditional" onload="updatepanel1_Load" ChildrenAsTriggers="false"> <ContentTemplate> <asp:HiddenField id="sendingRequest" runat="server" Value="0" /> .... </ContentTemplate> </asp:UpdatePanel>
I also have javascript on my page that does this to trigger the update of the update panel:
var sendingRequest = document.getElementById("<%=sendingRequest.ClientID%>"); sendingRequest.value = "1"; __doPostBack('<%= updatepanel1.ClientID %>', '');
Everything is working fine so far, but in my updatepanel1_Load event, I am trying to set the value back to "0":
sendingRequest.Value = "0";
This value is never updated or returned to 0 on the client after the postback, and I cannot understand why!
Can anyone help? Thanks
source share