[VB.NET] 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 | CodingSchnauzer
 

[VB.NET] 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

| Posted in Programming

One day I would like to show dialog box on my web page, but got the error.  

but got the error



Problem

The Error Message:
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

Reason:
You can not use MsgBox to Showing dialog box when the application is on IIS.





Solution

Showing dialog box via “alert” with “ScriptManager.RegisterStartupScript”

Step 1. Create a Sub as below:



Step 2. use showbox to show the message instead of MsgBox . it works.


Leave a Reply

Your email address will not be published. Required fields are marked *

CodingSchnauzer ©2020. All Rights Reserved.