在Asp .Net中多次显示弹出消息

时间:2014-08-23 11:48:58

标签: javascript asp.net popup popupwindow

我正在开发一个asp网络项目我需要在弹出窗口中添加一些选项,每当我选择弹出窗口并从下拉列表中选择选项时,单击OK按钮隐藏面板并显示web表单下次单击LnkBtnGet按钮显示弹出窗口window.My问题Wheen选择它第一次工作,第二次点击LnkBtnGet看到Dropdownlist但按钮消失。怎么能解决这个问题。请帮助我。

表格代码

<div class="tools"><asp:LinkButton ID="LnkBtnGet"  runat="server" ForeColor="White" Font-Bold="True" Font-Size="Medium"  Text="+Add" OnClick="LnkBtnGet_Click"  />
  </div>

Javascript代码

<script type = "text/javascript">
function BlockUI(elementID) {
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_beginRequest(function () {
        $("#" + elementID).block({
            message: '<table align = "center"><tr><td>' +
     '<img src="images/loadingAnim.gif"/></td></tr></table>',
            css: {},
            overlayCSS: {
                backgroundColor: '#000000', opacity: 0.6
            }
        });
    });
    prm.add_endRequest(function () {
        $("#" + elementID).unblock();
    });
}
$(document).ready(function () {

    BlockUI("<%=pnlAddEdit.ClientID %>");
    $.blockUI.defaults.css = {};
});
    function Hidepopup() {
        $find("popup").hide();
        return false;
    }

小组代码1:`

<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" style = "display:none">

    <asp:DropDownList ID="DropDownList1" Width="180px" Height="40px" runat="server">       </asp:DropDownList>           
    <asp:Button Width="150px" Height="40px" ID="Button2" runat="server" Text="OK" Visible="true" OnClick="Save"></asp:Button> </table>

`

小组守则2

<asp:LinkButton ID="LinkButton1" runat="server" ></asp:LinkButton><cc1:ModalPopupExtender ID="popup"runat="server" DropShadow="false"PopupControlID="pnlAddEdit"TargetControlID = "lnkFake"BackgroundCssClass="modalBackground"></cc1:ModalPopupExtender>

1 个答案:

答案 0 :(得分:0)

将行弹出更改为this