开发者

Popup does not work sometimes when a button is clicked. where is the problem at? -Asp.net

Why do popup does not work sometimes. There is no condition for popup. Whenever a button is clicked, it has to pop. Where do you guys think the problem might be??

Thanks,

<table id="pnlPopupAdditional" runat="server" style="display:none">
    <tr>
        <td>
            <asp:Panel runat="server" CssClass="modalPopup">
                <table width="350" height="80" class="warningPopup">
                    <tr>
                         <td>
                            <!-- <img src="images/warning_blue.gif" alt="Warning" /> -->
                        </td>
                     开发者_高级运维   <td colspan="2" align="left" style="padding-left: 75px; padding-top: 10px;">
                            <asp:Literal ID="ltMessage" runat="server"></asp:Literal>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="4">
                            <input id="btnYesAdditional" type="button" value="YES" class="popupButton" />
                            <input id="btnNoAdditional" type="button" value="NO" class="popupButton" />
                        </td>
                    </tr>
                </table>

            </asp:Panel>
        </td>
    </tr>
</table>
<asp:Button ID="btn" runat="server" Visible="false" />

private void SetAdditionalLocationMessage() { _AccountSummary accountSummary = new _AccountSummary(); accountSummary = new Merchant2().GetAccountSummary(MerchantID);

    if (accountSummary != null)
    {
        if (accountSummary.PackageID != (int)CommonHelper.Package.Free )
            btnAdd.Visible = true;
        else 
            btnAdd.Visible = false;
    }

    if (new Merchant2().IsLocationCountExceed(MerchantID))
    {
        string locationFee = new Merchant2().GetAdditionalLocationFee(accountSummary.PackageID).ToString();
        ltMessage.Text = String.Format(ApplicationData.MSG_ADDITIONAL_LOCATION_CHARGE, locationFee);

        ModalPopupExtender1.TargetControlID = "btnAdd";
        ConfirmButtonExtender1.TargetControlID = "btnAdd";
    }
    else
    {
        ModalPopupExtender1.TargetControlID = "btn";
        ConfirmButtonExtender1.TargetControlID = "btn";
    }
    //Controls_UC

protected void btnAdd_Click(object sender, ImageClickEventArgs e) { MerchantID = CommonHelper.GetLoggedInMerchant();

    string QueryString = ApplicationData.URL_MERCHANT_COMPANY_PAYMENT + "?MerchantProfilePages";

    Response.Redirect(QueryString);


It may be a result of JavaScript referenced DOM elements being disposed of during an AJAX request.

This is assuming you are acquiring a JavaScript reference of the DOM element referenced via pnlPopupAdditional.ClientID, so that you may modify the display:none; style declaration.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜