locked
Why my modalpopup doesn't appear? RRS feed

  • Question

  • User-1557899894 posted

    I caught a example from ASP.NET's site and I put on my project but I still having problems and my popup doesn't appear or appear like a common control into page.

    <div>
            <asp:Button id="buto" Text="Button" runat="server" />
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:Panel ID="painel" BackColor="Aqua" runat="server" Width="300px" Height="100px" style="display:none">
                <asp:Button ID="Button2" runat="server" Text="Button2" />
            </asp:Panel>
        </div>
        <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
            TargetControlID="buto"
            DropShadow="true"
            PopupControlID="painel"
            CancelControlID="painel">
            </ajaxToolkit:ModalPopupExtender>

    This code is the same of ASP.NET's site. I just switch the names of controls.

    Tuesday, October 22, 2013 9:42 AM

Answers

  • User-1557899894 posted

    Hello, guys. I'd really, really do what you instructed me, but the modal insists not appear. I would like that it to appear, but if I keep insisting, I will spend very time.

    Thanks, guys I think that I will to have to quit with this and to build a page just to show what the users want to comment.
    I just don't understand why in my project this not work. All of examples in web, which I downloaded, work and when I make in my code, not works.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 28, 2013 6:00 AM

All replies

  • User-1360095595 posted

    You need to specify the BackgroundCssClass property and the related CSS. That's critical.

    Tuesday, October 22, 2013 4:49 PM
  • User-417640953 posted

    Hi Pegudo,

    Thank you for posting to asp.net forum.

    The code looks fine to me. Please try to replace ScriptManager with ToolkitScriptManager.

    Below link is the introduction of ModalPopupExtender, I suggest you read it and learn more about it.

    http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx 

    If you still cannot solve it, please feel free to back and share more information or code with us. Then we will provide further solution.

    Thanks.

     

    Best Regards!

    Thursday, October 24, 2013 5:02 AM
  • User-1557899894 posted

    Hi, from Brazil, thanks a lot but I still having problems.
    I rewrite my code. see bellow:

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:Button ID="buto" runat="server" Text="Button" />
    <asp:Panel ID="modal" runat="server" style="display:none">
        <asp:Button ID="fecha" Text="Fecha" runat="server" />
    </asp:Panel>
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
        TargetControlID="buto"
        BackgroundCssClass="modalBackground"
        CancelControlID="fecha"
        DropShadow="true"
        PopupControlID = "modal">
    </ajaxToolkit:ModalPopupExtender>

     

    And, Css:

    .popupControl
    {
        background-color:#aad4ff;
        ;
        visibility: hidden;
        border: 2px solid #000;
    }
    
    .modalBackground
    {
        background-color: #a5a5a5;
        filter: alpha(opacity=70);
        opacity:0.7;
    }
    
    .modalPopup
    {
        background-color:#ffd;
        border: 3px solid gray;
        padding: 3px;
        width: 250px;
    }
    

    My scriptManager is native from VS2010 and my ToolKit Ajax was downloaded from internet. Could be incompatibility?
    Or Web.config is not ok?
    Code inside Web.config:

    <pages>
      <controls>
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>


     

     

    Thursday, October 24, 2013 6:54 AM
  • User-1557899894 posted

    Hi, hello from Brasil,
    I already have been see this site. Parts of my code was from there.

    I Even downloaded an example from there and, surprise, it worked.
    When I reproduce that code to my project, not work, just doesn't appear.

    Thursday, October 24, 2013 7:03 AM
  • User-417640953 posted

    I Even downloaded an example from there and, surprise, it worked.
    When I reproduce that code to my project, not work, just doesn't appear.

    Hi Pegudo,

    Thanks for your response.

    Based on the scenes, I suggest you redownload the ajaxcontroltoolkit dll from below link and add it to your visual studio.

    http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Default.aspx

    Make a sample for using ModalPopupExtender following its example step by step not copy or reproduce.

     

    Thanks.

     

    Regards! 

    Thursday, October 24, 2013 9:39 PM
  • User555306248 posted

    do you have the doctype set?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Please refer this

    http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx and http://www.asp.net/ajaxLibrary/act_ModalPopup.ashx

    Friday, October 25, 2013 12:16 AM
  • User-1557899894 posted

    Hello, guys. I'd really, really do what you instructed me, but the modal insists not appear. I would like that it to appear, but if I keep insisting, I will spend very time.

    Thanks, guys I think that I will to have to quit with this and to build a page just to show what the users want to comment.
    I just don't understand why in my project this not work. All of examples in web, which I downloaded, work and when I make in my code, not works.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 28, 2013 6:00 AM