challengeAccepted
challengeAccepted

Reputation: 7590

Popup when a link is clicked

I need a popup when a link is clicked. But in the page load itself, popup is shown at the bottom of the page. I want it to be shown only when the link is clicked. Where am i doing wrong?? Please help me out guys! I am a learner. Thanks a lot!

<cc1:ConfirmButtonExtender DisplayModalPopupID="ModalPopupExtender4" ID="ConfirmButtonExtender4"
                runat="server" TargetControlID="lnkremoveloc" Enabled="False" OnClientCancel="RemoveLocations">
            </cc1:ConfirmButtonExtender>
            <cc1:ModalPopupExtender ID="ModalPopupExtender4" OkControlID="btnDisable" CancelControlID="btnCancel"
                BackgroundCssClass="modalBackground" PopupControlID="pnlRemove" TargetControlID="lnkremoveloc"
                runat="server">
            </cc1:ModalPopupExtender>
            <asp:Panel CssClass="modalPopup" ID="PnlRemove" runat="server">
                <!-- Common Popup Control Begin -->
                <table class="tblCommonPopup" width="400" cellpadding="0" cellspacing="0">

                <tr>
                    <td class="topLeft">
                    </td>
                    <td class="topMiddle">
                    </td>
                    <td class= "topRight">
                    </td>
                </tr>
                <tr>
                    <td colspan="5" class="middle" align="center">--%>
                        <!-- Content Area Begin -->
                        <table>
                            <tr>
                                <td colspan="1" style="padding-top: 10px;" title="Select">

                                </td>
                                <td colspan="4" style="padding-top: 10px;" title="Location Name">

                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="5">
                                    <input id="btnDisable" type="button" value="Disable" class="popupButton" />
                                    <input id="Cancel" type="button" value="Cancel" class="popupButton" />
                                </td>
                            </tr>
                        </table>
                        <!-- Content Area Ends -->
                    </td>
                </tr>
                <tr>
                    <td class="bottomLeft">
                    </td>
                    <td class="bottomMiddle">
                    </td>
                    <td class="bottomRight">
                    </td>
                </tr>
            </table>
            <!-- Common Popup Control End -->
       </asp:Panel>

Upvotes: 4

Views: 502

Answers (3)

BirDMaN
BirDMaN

Reputation: 1

Woworks is correct and onClick on link set pnlPagePopup.Visible = true;

Upvotes: 0

Woworks
Woworks

Reputation: 1468

Try change

<asp:Panel ID="pnlPagePopup" Style="display: none;" runat="server" >

to

<asp:Panel ID="pnlPagePopup" Visible="false" runat="server" >

Upvotes: 1

ajay_whiz
ajay_whiz

Reputation: 17931

hope modalBackground css is there on your page/style sheet ?

Upvotes: 0

Related Questions