locked
modalpopupextender vanishes instantly after clicking RRS feed

  • Question

  • User-1767698477 posted

    As soon as you click the button, the 4 textboxes popup for a brief moment and then immediately vanish. What is causing this to happen? It is supposed to stay there until the close button is clicked;

    <%@ Page Title="" Language="VB" MasterPageFile="~/templates/default.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
        <title>Create Login ID | MortgageLoanApply.com</title>
        <meta name="description" content="Pacific West Capital" />
        <meta name="keywords" content="Registration, Create login" />
        <style type="text/css">
            .modalBackground {
                background-color: transparent;
                filter: alpha(opacity=90);
                opacity: 0.8;
            }
    
            .modalPopup {
                background-color: white;
                border-width: 3px;
                border-style: solid;
                border-color: black;
                padding-top: 1px;
                padding-left: 10px;
                padding-right: 10px;
                width: 185px;
                height: 160px;
                ;
                top: 180px;
                left: 350px;
            }
        </style>
        <script type="text/javascript">
            $(document).ready(function () {
                $("btnSubmit").click(function () {
                    //var x = document.getElementById("alerttype");
                    //var y = document.getElementById("alertreason");
                    alert("Value: " + $("#alerttype").val());
                });
            });
        </script>
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceholder1" runat="Server">
        <div id="menu" class="container">
            <ul>
                <li><a href="default.aspx">Home</a></li>
                <li><a href="features.aspx">Features</a></li>
                <li><a href="pricing.aspx">Pricing</a></li>
                <li><a href="login.aspx">Login</a></li>
                <li class="current_page_item"><a href="register.aspx">Register</a></li>
                <li><a href="contact.aspx">Contact</a></li>
            </ul>
        </div>
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceholder2" runat="Server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
      
        <!-- ModalPopupExtender -->
        <cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panel1" TargetControlID="BtnShow"
            CancelControlID="btnClose" BackgroundCssClass="modalBackground">
        </cc1:ModalPopupExtender>
        <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" align="center" Style="display: none">
           
            <asp:Label ID="Label7" runat="server" Text="MortgageLoanApply.com - Terms of Service"
                ForeColor="#FFB30F" Font-Size="Large" Font-Bold="True"></asp:Label>
    
            <div style="height: 60px">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
    
            <asp:Button ID="btnClose" runat="server" Text="Close" />
        </asp:Panel>
        <!-- ModalPopupExtender -->
        <asp:Button ID="BtnShow" runat="server" Text="Fee Split" />
    </asp:Content>

    Saturday, December 19, 2020 3:13 AM

All replies

  • User-939850651 posted

    Hi sking,

    According to your description, I tested the code you provided, but did not encounter the problem you described.

    I found that you are using a master page ( default.master ) , and I am not sure if it has any effect.

    If possible, please provide the sample code of the master page, which will be able to better find out the cause of the problem and solve it.

    This is my test result:

    Best regards,

    Xudong Peng

    Monday, December 21, 2020 6:44 AM