C#代码中的消息框 [英] Message box in C # code
本文介绍了C#代码中的消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
请参阅以下Message.show()方法,在执行此操作时,我正在关注错误显示模式对话框或表单时应用程序未在UserInteractive模式下运行不是有效操作。指定ServiceNotification或DefaultDesktopOnly样式以显示来自服务应用程序的通知。
Hi All,
See the following Message.show() method, while executing this I am getting following errer "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."
int CountofRecords = new SbBCL.BCLDataBase().getcount(formatted1);
if (CountofRecords != 0)
{
if (MessageBox.Show("this kortaPayment date " + formatted1 + " Contains " + CountofRecords + " Records in SB do you want to Import?", "Confirm mport", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
//code
}
else
{
//Message = "kortaPayments not imported";
goto end;
}
谢谢&此致,
Sivarjun。
Thanks & Regards,
Sivarjun.
推荐答案
在Web应用程序中,当您使用创建消息框时MsgBox或MessageBox,它将在您的服务器中显示,而不是在客户端计算机上显示。
我建议您使用jQuery MessageBox控件或ajax。
有很多示例像 http://jquerymsgbox.ibrahimkalyoncu.com [ ^ ]
http://www.webmasters.by/images/articles/jquery.alerts/index.html [ ^ ]
但是,使用MsgBox在客户端上显示基于Windws的Modal Box肯定是不可能的MessageBox等。
Hi,
in Web Applications, when you create a Message Box using MsgBox or MessageBox, itwill show in your server, not on the clients computer.
I suggest you to use a jQuery MessageBox Control or ajax.
There are lot of examples on the web like http://jquerymsgbox.ibrahimkalyoncu.com[^]
http://www.webmasters.by/images/articles/jquery.alerts/index.html[^]
however, it is certainly impossible to Show a Windws based Modal Box on the client using MsgBox or MessageBox etc.
这篇关于C#代码中的消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文