Mcbaloo Mcbaloo - 1 month ago 17
ASP.NET (C#) Question

Can the asyncpostbacktrigger of an update panel have two control id?

Just trying to blend things a bit. I have a button outside an update panel which controls an update panel very well. I also want another button to also update this same update panel which the click event is triggered. Anyway to achieve this, i have been able to make one button update the panel with this. now i want to make another button update that too

Answer

You can have multiple triggers registered to a single update panel. Something like the following should work:

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
  <ContentTemplate>
  </ContentTemplate>
  <Triggers>
    <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
    <asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
  </Triggers>
</asp:UpdatePanel>