javascript警报消息 [英] javascript Alert message
本文介绍了javascript警报消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
protected void Button1_Click(object sender, EventArgs e)
{
if ((DropDownList1.SelectedItem.Text == "---- Select ----") || (TextBox1.Text == "") || (TextBox2.Text == ""))
{
Label1.Visible = true;
Label1.Text = "All fields are mandatory, can not left blank.";
TextBox1.Text = "";
TextBox2.Text = "";
}
else if ((TextBox1.Text != TextBox2.Text))
{
Label1.Visible = true;
Label1.Text = "Confirm Password does not match, Try Again.";
TextBox1.Text = "";
TextBox2.Text = "";
TextBox1.Focus();
}
else
{
string lsUsrName, lsPwd;
lsUsrName = DropDownList1.SelectedItem.Text;
lsPwd = TextBox1.Text;
Response.Write("<script>var resp = window.confirm ('Are you sure want to change password?');alert(resp);</script>");
}
}
警告消息给出了正确的,我选择了,如何将它存储在ac#变量中以便进一步处理??????帮帮我专家....
alert message is giving the correct , which i select, how to store it in a c# variable for further process?????? Help me experts ....
推荐答案
隐藏的领域是方式,但有一些安全限制所以要小心。
阅读 [ ^ ]
您好,
对于您的问题,您可以使用Ajax工具包中的ModalPopupExtender控件。步骤: -
1.将一个模态弹出扩展器添加到.aspx页面,然后在其上添加两个按钮。
2.通过调用以下方式打开该弹出窗口: - ModalPopup1.show()
3.现在将事件添加到确定按钮。
如果您需要任何其他帮助,请发表评论。我会帮你的。
谢谢!
Hi,
For your problem you can use ModalPopupExtender control from Ajax toolkit. Steps:-
1. Add a Modal Popup Extender to your .aspx page and then add two buttons on it.
2. Open that popup by calling :- ModalPopup1.show()
3. Now add the event to your ''OK'' button.
If you need any other assistance please put comment. I will help you.
Thanks!
这篇关于javascript警报消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文