I am choking on this problem all day without moving forward. Update the contents of the panel, AsyncPostBackTrigger, if the caller is outside of the updatePanel. If you want to redirect, add it as a PostBackTrigger. Both things in the update panel using:
<asp:UpdatePanel ID="myUpdatePanel" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:LinkButton ID="link" runat="server" OnClick="link_Click"/> </ContentTemplate> <Triggers> <asp:PostBackTrigger ControlID="link" /> </Triggers> </asp:UpdatePanel>
My problem is that the controls are generated dynamically inside the custom control due to the list.
Decision:
ScriptManager.GetCurrent (this.Page) .RegisterPostBackControl (myRedirectButton);
In my case, I used listview to bind item data, so I got control using:
Control myRedirectButton = ListViewDataItem.GetControl("controlId")
Remember the difference between asynchronous and not one. This was the main point that I did not notice it until a very long time.
Noman_1
source share