如何使用messagebox而不使用自己的名称空间“使用sysytem.windows.form;" [英] How to use messagebox without using its own name space" using sysytem.windows.form;"

查看:76
本文介绍了如何使用messagebox而不使用自己的名称空间“使用sysytem.windows.form;"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用sysytem.windows.form,是否有任何方法可以在asp.net c#

中使用messagebox.show,而不是使用

????

Is there any way to use "messagebox.show" with yes or no options in asp.net c#
instead of using
"using sysytem.windows.form"????

推荐答案

您可以尝试使用PInvoke。检查代码在这里:

http:/ /msdn.microsoft.com/en-us/library/42b9ea93(v=vs.110).aspx [ ^ ]
You can try with PInvoke. Check the code is here:
http://msdn.microsoft.com/en-us/library/42b9ea93(v=vs.110).aspx[^]


试试这个

http:// www。 aspsnippets.com/Green/Articles/Server-Side-Code-Behind-Yes-No-Confirmation-Message-Box-in-ASPNet.aspx [ ^ ]



-KR
Try this out
http://www.aspsnippets.com/Green/Articles/Server-Side-Code-Behind-Yes-No-Confirmation-Message-Box-in-ASPNet.aspx[^]

-KR


如果需要System.Windows.Forms MessageBox,则必须引用System.Windows.Forms。但是,你真的想在服务器上显示一个MessageBox吗?我对此表示怀疑。



微软在这里有一个代码示例来模拟ASP.NET中的WinForm MessageBox功能:[ ^ ]。



有一篇文章在CP上使用自定义MessageBox for ASP.NET和Ajax:[ ^ ]。
If you want the System.Windows.Forms MessageBox, you must reference System.Windows.Forms. But, do you really want to show a MessageBox on the server, when your web whatever is hosted ? I doubt it.

Microsoft has a code example here to kind-of simulate the WinForm MessageBox functionality in ASP.NET: [^].

There's an article here on CP with a custom MessageBox for ASP.NET and Ajax: [^].


这篇关于如何使用messagebox而不使用自己的名称空间“使用sysytem.windows.form;"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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