I have two check boxes in an update panel. One is an ASP.NET CheckBox control, the other is just an HTML <input> element. I have a button in a different update panel.
So here’s the relevant portion of the page:
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
<ContentTemplate>
<input type="checkbox" id="check1" name="check1" />HTML Input<br />
<asp:CheckBox runat="server" ID="check2" Text="ASP CheckBox"></asp:CheckBox><br />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpdatePanel2">
<ContentTemplate>
<asp:Button runat="server" ID="Submit" Text="Submit" OnClick="Submit_Click" />
</ContentTemplate>
</asp:UpdatePanel>
I check both check boxes, then I click the button. What I’m seeing is the check mark disappears from the one that’s just HTML, but the check mark is still there for the CheckBox control.
Why? I would have thought that nothing in the first update panel would change, because I’m doing a partial postback of the second update panel.
If I move the two checkboxes out of the update panel, then both keep their check marks (as I would have expected).
My guess here is that your update panels need to be configured so that ONLY the update panel that is actually used is updated. When UpdatePanel2 is updated both panels are updating. I believe that as long as you set the UpdateMode=”Conditional” property on UpdatePanel1, you will get the desired effect.
You can see this MSDN Documentation on the UpdateMode property.