views:

1412

answers:

1

Hey guys,

Currently I have a custom user control and within it is a little form and a modal popup extender, the idea is for the user control to be loaded dynamically in the parent page and displayed so the user can fill out the form and submit it and all the submission code be handled on the user control

the problem I am having is when trying to make the modal popup display so the user can interact with it, nothing is being displayed at all, code follows:

the user control:

<asp:UpdatePanel ID="breakTheGlassUpdatePanel" runat="server">
<ContentTemplate>
    //some fields for entry and a submit/cancel button
</ContentTemplate>
</asp:UpdatePanel>

<ajaxToolkit:ModalPopupExtender runat="server" ID="breakModal"
    TargetControlID="breakModalHolder" 
    BackgroundCssClass="btgModalBackground" 
    DropShadow="true" 
    PopupControlID="breakTheGlassUpdatePanel" />

    <asp:Button ID="breakModalHolder" runat="server" Style="display:none;" />

Code in parent page:

BreakTheGlassControl btgControl = (BreakTheGlassControl)Page.LoadControl("~/ARISUserControls/BreakTheGlassControl.ascx");
AjaxControlToolkit.ModalPopupExtender breakModal = (AjaxControlToolkit.ModalPopupExtender)btgControl.FindControl("breakModal");
breakTheGlassPanel.Controls.Add(btgControl);//panel in parent page
breakTheGlassPanel.Visible = true;
breakTheGlassPanel.Controls.Add(btgControl);
breakModal.Show();
A: 

Hi, This page might help you. Essentially, it creates a normal panel and places the updatePanel inside it. The normal panel is then used as the Extender's PopupControlID attribute.

keyboardP