I’m having a hard time with the ASP.NET UpdatePanel. The problem is that my button will not fire its onclick event. I’ve tried numerous things and simply can’t figgure it out. Here is a code sample:
<asp:ScriptManager ID="smDefault" runat="server"></asp:ScriptManager>
<div style="display: none;">
<a id="various1" class="ltbtn" href="#inline1" style="display:none;"></a>
<!-- / light box \ -->
<div class="lightBox" id="inline1">
<h2>Nieuw tijdsvak</h2>
<fieldset>
<div class="nieuweReactie">
<asp:UpdatePanel ID="pnlNieuwTijdsvak" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<label>Start tijd</label><asp:TextBox ID="txtStartTijd" runat="server" CssClass="field datepicker"></asp:TextBox>
<label>Eind tijd</label><asp:TextBox ID="txtEindTijd" runat="server" CssClass="field datepicker"></asp:TextBox>
<asp:Button ID="btnVoegTijdToe" runat="server" Text="Toevoegen"
CssClass="btn" onclick="btnVoegTijdToe_Click" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnVoegTijdToe" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</div>
</fieldset>
</div>
<!-- \ light box / -->
</div>
My thoughts are that this should be valid, or am i missing something here?
Thnx in advance!
I’ve found an easy implementable solution myself. Example