服务器端的确认框 [英] Confirm box on server side

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

问题描述



如何在服务器端按钮单击事件上调用确认消息框,因为如果用户单击确定按钮我想执行某些操作,否则执行其他代码如果单击取消 '按钮。



谢谢。


How can call confirm message box on server side button click event because I want to perform some operation if user click on 'ok' button else execute other code if it click on 'cancel' button.

thank you.

推荐答案

试试这段代码,

它会帮助你..



Try this code,
it will help you..

string script = " if  (confirm(' do you want to perform this operation???')) window.location='transactionpage.aspx'";
           Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", script, true);


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

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