确认消息框 [英] Confirmation messagebox

查看:105
本文介绍了确认消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我吗?
如何在aspx.vb页中获取COnfirmation消息框值? 我可以使用button1.Add.Attribute()方法添加一个确认消息框.如果响应为true
label1.text ="TRUE"否则label1.text ="FALSE"
我不知道如何获得确认值..... plzz帮帮我
在此先感谢

Can anyone please help me?
How to get the COnfirmation messagebox value in aspx.vb page???
I could add a confirmation messagebox with button1.Add.Attribute() method.If the response is true
label1.text="TRUE" else label1.text="FALSE"
I dono how to get the confirmation value.....plzz help me
Thanks in advance

推荐答案

在javascript警报功能中显示传统消息框"外观

Javascript警报 [
to show a "traditional messagebox" look into the javascript alert function

Javascript Alert[^]


Same way that your are doing using JavaScript.

But Register that function from codbehind using
ClientScript.RegisterStartupScript(this.GetType(), "Confirm",
"<script>Confirm('" + Are You Sure ?+ "');</script>");

or if use ajax in your page then ScriptManager instate of ClientScript



您还可以使用此代码



aur else you can use this code also

<asp:button runat="server" id="Button1" onclick="Button1_Click" style="display:none;"  />
...
<script type="text/javascript">
        function callBack(args)
        {
            document.getElementById("Button1").click();
        }
        function openConfirm()
        {
            radconfirm("Are you sure?", callBack);
        }
</script>


诸如此类的Google问题- ^ ]
Such a Google question - confirm box from code behind page[^]


这篇关于确认消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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