Click here to Skip to main content
16,017,899 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
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."
C#
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;
   }

Thanks & Regards,
Sivarjun.
Posted
Updated 22-Sep-13 20:43pm
v2
Comments
Thanks7872 23-Sep-13 2:30am    
Where is the question?

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900