在Visual Studio 2005中无法显示消息框 [英] cant display messagebox in visual studio 2005

查看:75
本文介绍了在Visual Studio 2005中无法显示消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2005中做了一个示例Web应用程序,但是在Visual Studio 2005中却没有显示显示消息框.如何解决它.

I did a sample web application in visual studio 2005.But I can''t get display message box in visual studio 2005.How can I solve it.

推荐答案

在Web应用程序中使用MessageBox是一件难事,然后,如果您想在Web应用程序中显示消息框,则必须添加"System.Windows.Form"的引用,添加引用后,您可以编写"MessageBox.Show(" Hello);"并且可以正常工作.
It''s a bed thing to use MessageBox into Web Application, then also if you wish to show message box into web application, you have to add reference of "System.Windows.Form", after adding reference you are able to write "MessageBox.Show(''Hello'');" and it''s going to work.


要在Web应用程序中显示消息框,您应该使用客户端脚本,例如

alert(''hello'');

http://www.w3schools.com/js/js_popup.asp [
To show a message box in a web application, you should be using client script, e.g.

alert(''hello'');

http://www.w3schools.com/js/js_popup.asp[^]


这篇关于在Visual Studio 2005中无法显示消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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