Lee c.c.
Lee c.c.

Reputation: 69

ModalPopupExtender not show after a few click

I have 2 modalpopupextender in my page, first modalpopupextender I use it to popup message, second one i use to let user make some choose. When running, it look fine, but after some open and close on first or second modalpopupextender, it will not show on top of screen, so i can't see it. What i mean is, it look like not show on screen, but if i use developer tool to check it, I can see it show under the front page, so i can't click any button on it, and this make the whole page hanged.

my code is like below:

<asp:UpdatePanel runat="server" ID="ModalPanel1" RenderMode="Inline"    UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Button ID="btnhidden" runat="server" Text="" Style="display: none"  OnClick="btnhidden_Click" />
            <asp:Panel ID="pnDialog" runat="server" BorderColor="#003399"
                BorderStyle="Solid" BorderWidth="3px">
                <asp:Panel ID="pnTitle" runat="server" BackColor="#003399" CssClass="Title" ForeColor="White">
                    TITLE
                </asp:Panel>
                <asp:Panel ID="Panel1" runat="server" BackColor="White" Style="padding: 8px 8px 8px 8px">
                    <div id="divContent" class="Content" style="padding-left: 6px">
                        <br />
                    <asp:HiddenField ID="hdn" runat="server" Visible="False" />
                    <asp:Label ID="MessageWord" runat="server" Text="message......." CssClass="LabelStyle"></asp:Label>
                </div>
                <hr />
                <div id="divButton">
                    <asp:Button ID="btnOK" runat="server" Text="OK" CssClass="ButtonStyle" UseSubmitBehavior="False" Width="80px" />
                </div>
            </asp:Panel>
        </asp:Panel>
        <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
            TargetControlID="btnhidden"
            PopupControlID="pnDialog"
            BackgroundCssClass="mlBackground"
            DropShadow="true"
            CancelControlID="btnOK"
            >
        </ajaxToolkit:ModalPopupExtender>
    </ContentTemplate>
</asp:UpdatePanel>

javascript:

function onOK() {
    $find('ModalPopupExtender1').hide();
    }

code behind:

protected void btnOK_Click(object sender, EventArgs e)
{
    if (hdn.Value == "1")
    {
        Response.Redirect("~/FH/FHLogin.aspx");
    }
    if (hdn.Value == "2")
    {
        ModalPopupExtender1.Hide();
    }
}

screenshot: enter image description here

Please help me to solve this problem

Upvotes: 1

Views: 561

Answers (1)

Mikhail Tymchuk
Mikhail Tymchuk

Reputation: 896

This issue is solved in v16.1 release.

Upvotes: 1

Related Questions