Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I solved this hiding the ajax pop up inside a panel configured as visible=false. I fire the popUp in codeBehind. here is some code:</p> <pre><code>&lt;asp:LinkButton runat="server" ID="lbCredits1" Font-Underline="true" CausesValidation="false" OnClick="btMpeCredits_Click"&gt;Credits&lt;/asp:LinkButton&gt; &amp;nbsp;|&amp;nbsp; &lt;asp:LinkButton runat="server" ID="lbPrivacy2" Font-Underline="true" CausesValidation="false" OnClick="btMpePrivacy_Click"&gt;Privacy&lt;/asp:LinkButton&gt; &lt;%--AjaxPopUpExtenderArea--%&gt; &lt;asp:Panel ID="pnlAjaxArea" runat="server" Visible="false"&gt; &lt;%--PrivacyMPE--%&gt; &lt;%--I have to hide the link button referenced in the AjaxPopUpExtender. I will use a different button to show the pop up--%&gt; &lt;div style="display:none;"&gt; &lt;asp:LinkButton runat="server" ID="lbPrivacy" Text="PRIVACY"/&gt; &lt;/div&gt; &lt;asp:ModalPopupExtender ID="MpePrivacy" runat="server" TargetControlID="lbPrivacy" PopupControlID="PnlPrivacy" BackgroundCssClass="modalBackground" &gt; &lt;/asp:ModalPopupExtender&gt; &lt;asp:Panel runat="server" ID="PnlPrivacy" Height="500px" Width="600px" BorderStyle="Solid" BorderColor="#1E549E" BorderWidth="3px" BackColor="#FFFFFF" ScrollBars="Auto"&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td&gt; &lt;UcPrivacy:Privacy runat="server" ID="Privacy" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt; &lt;asp:ImageButton ImageUrl="~/App_Themes/GfRegistrationPage/images/chiudi-btn.gif" runat="server" OnClick="btMpeClose" CausesValidation="False" /&gt; &lt;br /&gt; &lt;br /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/asp:Panel&gt; &lt;%--CreditsMPE--%&gt; &lt;div style="display:none;"&gt; &lt;asp:LinkButton runat="server" ID="lbCredits" Text="credits"/&gt; &lt;/div&gt; &lt;asp:ModalPopupExtender ID="MpeCredits" runat="server" TargetControlID="lbCredits" PopupControlID="PnlCredits" BackgroundCssClass="modalBackground" &gt; &lt;/asp:ModalPopupExtender&gt; &lt;asp:Panel runat="server" ID="PnlCredits" Height="500px" Width="600px" BorderStyle="Solid" BorderColor="#1E549E" BorderWidth="3px" BackColor="#FFFFFF" ScrollBars="Auto"&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td&gt; &lt;UcCredits:Credits runat="server" ID="Credits" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt; &lt;asp:ImageButton ImageUrl="~/App_Themes/GfRegistrationPage/images/chiudi-btn.gif" runat="server" OnClick="btMpeClose" CausesValidation="False" /&gt; &lt;br /&gt; &lt;br /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/asp:Panel&gt; &lt;/asp:Panel&gt; </code></pre> <p>and here some code behind:</p> <pre><code> #region ModalPopUpS Privacy credits protected void btMpePrivacy_Click(object sender, EventArgs e) { pnlAjaxArea.Visible = true; AjaxControlToolkit.ModalPopupExtender modalPop = ((AjaxControlToolkit.ModalPopupExtender)(this.Master.FindControl("ContentPlaceHolder1").FindControl("MpePrivacy"))); modalPop.Show(); } protected void btMpeCredits_Click(object sender, EventArgs e) { pnlAjaxArea.Visible = true; AjaxControlToolkit.ModalPopupExtender modalPop = ((AjaxControlToolkit.ModalPopupExtender)(this.Master.FindControl("ContentPlaceHolder1").FindControl("MpeCredits"))); modalPop.Show(); } protected void btMpeClose(object sender, EventArgs e) { pnlAjaxArea.Visible = false; } #endregion </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload