<ajaxtoolkit:AccordionPane ID="accordianPaneAroundTheCheckbox" runat="server">
<Content>
<asp:UpdatePanel ID="updatePanelAroundTheCheckbox" runat="server" >
<ContentTemplate>
<div>
<asp:CheckBox ID="chkFoo" AutoPostBack="true" runat="server" OnCheckedChanged="DoBar"/>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</Content>
</ajaxtoolkit:AccordionPane>
We have something like the above. Extra stuff has been left off as it is a large page.
I place a breakpoint at the begining of Page_Load
and DoBar
. The first time I click the checkbox, the breakpoint on Page_Load
is hit, but DoBar
is not. The second time I click the checkbox, both breakpoints are hit.
Why could this be happening? I'm not dynamically generating the checkbox. It's ClientID is the same every time (no dynamically generated or ID'd containers). I've tried resubscribing to the event in the Page_Load
, but it didn't hit the first time, and just hit it subsequent times twice.
Update I have tried removing the UpdatePanel completely. Not only does the whole page postback, which I don't want, but the event is still not entered. What can block/swallow an event call like that? Is there some exception deep in the bowels of a master page or framework call or something somewhere that I can't see?