I am having issues with popup panels disappearing because the control is posting back
I have a popup extender on a page which pops out a panel that contains a control I have created

        <asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager>
        <ajaxToolkit:ModalPopupExtender ID="PopupExtender1" PopupControlID="Panel1" runat="server" TargetControlID="Button1">

                <asp:Panel ID="Panel1" runat="server" BorderStyle="None" BorderWidth="1px" 
                        ClientIDMode="Static" HorizontalAlign="Center" Visible="False">
                            <uc1:UserControl1 ID="UCControl1" runat="server" 
                        Visible="False" />              

My problem is that every time I click on ButtonA on UserControl1 the popup disappears when I want it to update the error label on UCControl1 if there is an error and only disappear if everything is ok. I have tried surrounding the Panel1 with an updatePanel with conditional update mode and triggers. ButtonA is

<asp:LinkButton ID="ButtonA" runat="server" CssClass="buttonMid" 

Thanks in advance

Recommended Answers

All 5 Replies

Make sure that you call the popup again, in the button click event handler.

How would I do that from my control?
ButtonA is on the contorl not on the page that the control is on.


Create an instance of the popup control, and call it again.

This is an example creating an instance of a scriptmanager, on a master page, and registering a control ...

MasterPage Mp;
Mp = Master;
ScriptManager sm = (ScriptManager)Mp.FindControl("ScriptManager1");

Thanks for the help,

I checked for text in the error lable on the control


If it contained any text I did


Did it work?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.