显示带有两个选项的确认消息框(确定和取消) [英] display a confirm message box with two option(OK and Cancel)

查看:95
本文介绍了显示带有两个选项的确认消息框(确定和取消)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想显示带有两个按钮的确认脚本(确定和取消),当用户点击确定按钮时,网格视图显示在page.if点击取消然后gridview不显示。



请任何人帮我提供代码(在C#中)以显示带有这两个选项的确认消息框。罢工>紧急。



感谢您的帮助。

Hi All,

I want to display a confirmation script with two button (Ok and Cancel) and when the user clicks the OK button the grid view show on the page.if click cancel then gridview not show.

Please anyone help me with the code ( in C# ) to display a confirm message box with this two options.Its urgent.

Thanks for your help.

推荐答案

试试这个< br $> b $ b

http://aspsnippets.com/Articles/Server-Side-Code-Behind-Yes-No-Confirmation-Message-Box-in-ASPNet.aspx [ ^ ]



谷歌搜索会给你很多类似的结果
Try this

http://aspsnippets.com/Articles/Server-Side-Code-Behind-Yes-No-Confirmation-Message-Box-in-ASPNet.aspx[^]

A google search will give you lots of similar results


你有没有交流go to google.com?请参阅:确认回发OnClientClick按钮ASP.NET [ ^ ]
Don't you have access to google.com? See this : Confirm postback OnClientClick button ASP.NET[^]


 <asp:panel id="pnlPopup" runat="server" cssclass="csspnlPopup" style="display: none;">
            <asp:button id="btnOk" runat="server" text="Ok" />
            <asp:button id="btnCancel" runat="server" text="Cancel" />
        </div>
</asp:panel>







当你想要显示弹出窗口时只需更改样式属性






When you want to show the popup just change the style property

document.getElementById('<%=pnlPopup.ClientID %>').style.display = 'inline';

the cssPnlPopUp class is like as follows







.csspnlPopup {
background: none repeat scroll 0 0 #696969;
    border-style:solid;
    border-width:thick;
    border-color:darkgray;
    display: inline;
    height: 250px;
    margin-left: 460px;
    margin-top: 120px;
    position: fixed;
    top: 0.5em;
    width: 450px;
    z-index: 1;
    font-size:1.4em;
}


这篇关于显示带有两个选项的确认消息框(确定和取消)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆