Hi,
Is it possible to have many buttons associated with a single ModalPopupExtender?
<asp:Button ID="btnPopup" runat="server" Text="PopUp" style = "display:none" /> // default control
<asp:Button ID="Button1" runat="server" CssClass="btn btn-primary"
Height="200px" Width="200px" onclick="Button1_Click" /><asp:Button ID="Button2" runat="server" CssClass="btn btn-primary"
Height="200px" Width="200px" onclick="Button2_Click" /><asp:ModalPopupExtender ID="mpe" runat="server" BackgroundCssClass="modalBackground" PopupControlID="pnlPopup" TargetControlID="btnPopup" /><asp:Panel ID="pnlPopup" runat="server" CssClass="modalPopup" Style="display: none">
// I will have updatepanel where content will change based on which button is clicked
</asp:Panel>protected void Button1_Click(object sender, EventArgs e)
{
mpe.TargetControlID = "Button1";
}
protected void Button2_Click(object sender, EventArgs e)
{
mpe.TargetControlID = "Button2";
}This doesn't seem to work.
Thank you!