在C#代码窗口中确认对话框框 [英] confirm dilog box in c# code window
本文介绍了在C#代码窗口中确认对话框框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当他按一下确定"按钮时,我想输入一些代码.我们该如何写.请帮帮我
ScriptManager.RegisterStartupScript(this,this.GetType(),"ajax",< script language =''javascript''> confirm(``你想改变吗?'');</script>",false )
if(clicked == yes)
{
//做某事
}
其他
{
//做某事
}
Hi, I wanted to some code when he clcik ok button . how do we write for that. Please help me
ScriptManager.RegisterStartupScript(this, this.GetType(), "ajax", "<script language=''javascript''>confirm(''Do u wanna change?'');</script>", false)
if(clicked ==yes)
{
//do somthing
}
else
{
//do smthing
}
推荐答案
是的,这可以通过javascript函数
实现 只是reffer:
http://theinfiniteloopblog.com/programming/jscript/custom-javascript-alert -and-confirm-dialog-boxes/ [
Yes this is possible by javascript function
just reffer :
http://theinfiniteloopblog.com/programming/jscript/custom-javascript-alert-and-confirm-dialog-boxes/[^]
ScriptManager.RegisterStartupScript(this, this.GetType(), "ajax", "<script language="javascript">if(confirm('Do u wanna change?')){ //do somthing } else { //do smthing } </script>", false)
试试这个
try this
嗨
您可以尝试使用javascript显示和处理我的代码.
hi
you can try my code for displaying and processing using javascript.
<script language ="javascript" >
function delval() {
if (confirm("Do you want to delete")) {
这篇关于在C#代码窗口中确认对话框框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文