I've been attempting to discover the solution, however it would be greatly appreciated if someone could take a look.
Within my aspx page and C# codebehind, I have the following:
aspx:
<asp:UpdatePanel runat="server" ID="UpdatePanel8" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAddTableRow" EventName="Click" />
</Triggers>
<ContentTemplate>
<div id="divDynamicFields" runat="server"></div>
</ContentTemplate>
</asp:UpdatePanel>
<div hidden>
<asp:Button ID="btnAddTableRow" runat="server" OnClick="AddTableRow" />
</div>
<script type="text/javascript">
function addTableRow(tableId) {
$('#<%=btnAddTableRow.ClientID%>').click();
}
</script>
C#:
protected void AddTableRow(object sender, EventArgs e)
{
(...)
}
The event triggers without issues if I do not use UpdatePanel. However, with UpdatePanel, there is a PostBack but the C# method does not get called. I have been trying to figure this out for some time now with no success. Any suggestions? Appreciate your help.