如我在某事件里:
Protected Sub but_add_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles but_add.Click
If tb.text = "" Then
msg.Text = "<script>confirm('没有值你要继续吗?')</script>" tb.text ="您输入的是:" & tb.text end If
End Sub当事件执行到msg.Text = "<script>confirm('没有值你要继续吗?')</script>" 弹出对话框的时候,怎么获取弹出的窗的值,让客户端点击 "确定" 然后 往下执行 tb.text ="您输入的是:" & tb.text 点击"取消"的时候而停止并退出事件呢?
Protected Sub but_add_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles but_add.Click
If tb.text = "" Then
msg.Text = "<script>confirm('没有值你要继续吗?')</script>" tb.text ="您输入的是:" & tb.text end If
End Sub当事件执行到msg.Text = "<script>confirm('没有值你要继续吗?')</script>" 弹出对话框的时候,怎么获取弹出的窗的值,让客户端点击 "确定" 然后 往下执行 tb.text ="您输入的是:" & tb.text 点击"取消"的时候而停止并退出事件呢?
Button1.Attributes.Add("onclick","<script>confirm('没有值你要继续吗?')</script>")
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
是这样的大家看来没有明白我的意图。
我是想在asp.net c#中,我点击一个按钮“提交”然后进入protected void bt_upload_Click(object sender, EventArgs e) {
if (IsTableExists())
{
Response.Write("<script language='javascript'>window.confirm('记录已存在,是否覆盖?');</script>");
//在这里判断如果点击确定进入update2ora()}
else
{
insertora()})proteched bool IsTableExist()
{
if(...)
return ture
else
return false
}protected bool update2ora()
{
}protected bool insert2ora()
{
}
Response.Write("<script language='javascript'>if (confirm('记录已存在,是否覆盖?')){window.location.href='do.aspx?action=something';}else{}</script>");
return false;/记得不同意的话返回false值}</script>");
执行的 步骤你理解错了。
执行的 步骤你理解错了。/////////////////////////////////////////////如何才能不让他先执行呢? 我就是想给客户端选择点击后,分别执行不同的事件!
http://bbs.doloop.cn/demo/SingleDemo/UI/MessageBox/gridmessagebox.aspx
http://bbs.doloop.cn/demo/default.aspx用服务器控件,后台处理事件