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
phani krishna battiproluPosted Sep 12, 2008, 6:02 AM
if ( System.Windows.Forms.
MessageBox.Show("Do u want to delete?", "Confirmation", System.Windows.Forms.MessageBoxButtons.YesNoCancel) == System.Windows.Forms.DialogResult.Yes){
//do your operations here
}
Regards
Phani Krishna.B
+919986824290
Probi ForumiPosted Aug 29, 2008, 12:11 PM
I dont know any javascript
can u help with an example?
thanks
Ryan AlfordPosted Aug 4, 2008, 1:43 PM
Niradhip ChakrabortyPosted Aug 4, 2008, 1:28 PM
You can read the following article by Mahesh for your reference.
1.http://www.c-sharpcorner.com/UploadFile/mahesh/WebMsgBox09082006110929AM/WebMsgBox.aspx