4
Answers

messagebox in web application

Ask a question
Probi Forumi

Probi Forumi

16y
9.7k
1

Hello

I have this code for a message box in my web application

DialogResult reply = MessageBox.Show(text, "Files", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

if (reply == DialogResult.Yes)

{if  (exst.Equals(".doc")) openword( dest, "yes");}

else if (reply==DialogResult.No)

{if (exst.Equals(".doc")) openword ( dest, "no");}

when I run this application in the localhost in VS2005 it has no problem, but when I publish the project and run it in the application server it gives this error :

System.InvalidOperationException: 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.

what is the problem and what I should do?

thanks a lot

Probi


Answers (4)
Next Recommended Forum