Asp.net ajax - ModalPopup with a form

Last post 11-10-2009 1:27 AM by Vince Xu - MSFT. 5 replies.

Sort Posts:

  • Asp.net ajax - ModalPopup with a form

    11-07-2009, 8:35 AM

    I would like to create a ModalPopup with a form. When someone click on a button a ModalPopup appears with a form.
    Is it possible ? And how to do it ? 

  • Re: Asp.net ajax - ModalPopup with a form

    11-07-2009, 8:57 AM

    It depends on what you mean by "form".  But refer to this video: http://www.asp.net/learn/ajax-videos/video-85.aspx

  • Re: Asp.net ajax - ModalPopup with a form

    11-07-2009, 9:18 AM

    I have an article and I want my users to write their comments about the article. At the bottom of the article I have a button that if someone click on it he can have a ajax modalpop with a form and he can write his comment into my database

  • Re: Asp.net ajax - ModalPopup with a form

    11-07-2009, 9:27 AM

    Look at the video I provided above.  In the panel that the modal extends, you can include any controls you want.  So you should be able to accomplish what you want fairly easily.

  • Re: Asp.net ajax - ModalPopup with a form

    11-08-2009, 2:35 PM

    My main problem is that when I write the following code:

    <div>
            <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none; width:233px">
                Ready
                <div align="center">
                    <asp:Button ID="OkButton" runat="server" Text="OK" />
                    <asp:Button ID="CancelButton" runat="server" Text="Cancel" />
                </div>
            </asp:Panel>
            <br />
            <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton1"
                PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true"
                OkControlID="OkButton" OnOkScript="onOk()" CancelControlID="CancelButton" />
        </div>

    <div>

            <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none; width:233px">

                My form......

                <div align="center">

                    <asp:Button ID="OkButton" runat="server" Text="OK" />

                    <asp:Button ID="CancelButton" runat="server" Text="Cancel" />

                </div>

            </asp:Panel>

            <br />

            <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton1"

                PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true"

                OkControlID="OkButton" OnOkScript="onOk()" CancelControlID="CancelButton" />

        </div>

    With the following CSS:

    .popupControl {

    background-color:#AAD4FF;

    position:absolute;

    visibility:hidden;

    border-style:solid;

    border-color: Black;

    border-width: 2px;

    }


    .modalBackground {

    background-color:Gray;

        filter: alpha(opacity=70);

    opacity:0.7;

    }


    .modalPopup {

    background-color:#ffffdd;

    border-width:3px;

    border-style:solid;

    border-color:Gray;

    padding:3px;

    }

    On explorer 8 the modal popup is under the gray and his position is at the bottom of the page without the ability to click on it. On chrome its perfectly work.

    Any Idea ?

  • Re: Asp.net ajax - ModalPopup with a form

    11-10-2009, 1:27 AM
    Answer

    Hi,

    You mean your MPE panel is covered by background layer? I guess the z-index of the panel is smaller than background's. You can define z-index to 10010 for modalpopup css style. 


    Vince Xu
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (6 items)