关于ASP.net中的消息框 [英] About messagebox in ASP.net

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

问题描述

我在更新面板中添加了一个按钮,并尝试显示一个消息框.
这没用.

是什么原因呢?

I have added a button inside update panel and try to display a Message box.
It did not work.

What is the reason for it?

Any help on how to resolve this?

推荐答案

我真的没有看到任何理由让更新面板显示消息框.为什么不使用JaVaScript/JQuery.
jQuery对话框是更好的选择.
I really didn''t see any good reason for update panel to display a message box. Why you are not using JaVaScript / JQuery.
JQuery Dialogs are the better options.


这是因为您的脚本未在脚本管理器中注册
你可以使用
this is because ur script is not registered in script-manager
u can use
scriptmanager.Registerstartupscript(Page,Page.gettype(),"ghghhh","''alert(''hai'')''",true);


 if (System.Windows.Forms.MessageBox.Show("Do you want to Modify?", "Question", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
{
//place ur code here
}


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

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