Home » FAQ » ASP.NET » Basic » Why do I get the error message ‘System.InvalidOperationException: It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a ….’
You can’t use MsgBox or MessageBox.Show in ASP.NET WebForm. You may use:
VB.NET
Response.Write('<script>alert(’Hello’);</script>')
C#
Response.Write('<script>alert(’Hello’);</script>') ;
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with