从服务器返回的状态代码是:500,同时显示MessageBox [英] The status code returned from the server was: 500 while tring to display MessageBox

查看:94
本文介绍了从服务器返回的状态代码是:500,同时显示MessageBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过长时间休息后我回到了.net我遇到了问题..


我编码显示使用System.Windows的消息框。 Forms.MessageBox.Show"根据条件显示,这在我的本地机器上工作正常,但是当我发布网站并将.dll输出进行测试时,我收到一条错误说


---- -----------------------

Microsoft Internet Explorer

-------- -------------------

Sys.WebForms.PageRequestManagerServerErrorExceptio n:在服务器上处理请求时发生未知错误。从服务器返回的状态代码是:500

---------------------------

OK

---------------------------

I am back in .net after a long break.. i am stuck with a problem ..

I have coded to display a message box using "System.Windows.Forms.MessageBox.Show " to show up based on condition and this works fine in my local machine but when i publish the site and put the .dll out for testing i am getting an error saying

---------------------------
Microsoft Internet Explorer
---------------------------
Sys.WebForms.PageRequestManagerServerErrorExceptio n: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
---------------------------
OK
---------------------------

推荐答案

你真的不应该在web应用程序中使用windows.forms命名空间。

此外,它只会弹出服务器上的消息框,而不是客户端上的消息框。 />

这就是javascript'的Alert()用于
You really shouldn''t be using windows.forms namespace in a web application.
Besides, it would only popup a messagebox on the server, not on the client.

That''s what javascript''s Alert() is for


感谢您的回复。我试过使用Alert但得到了一个Parser错误信息,如果你有的话,请你给我任何例子。
Thanks for your reply. I have tried using Alert but got an Parser error message, can you please gv me any examples if you have.


Ok。


简单的javescript :
Ok.

Simple javescript:
展开 | 选择 | Wrap | 行号


这篇关于从服务器返回的状态代码是:500,同时显示MessageBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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