error when try to run msgbox code
the message i got when try display msgbox, how to solve it..
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: 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.
Source Error:
Line 64:
Line 65: If uji.Text = txtAccNumber.Text Then
Line 66: MsgBox("dah ada dah data tu")
Line 67:
Line 68:
Re: error when try to run msgbox code
Are you making an ASP.NET web application? if so, you can't call a message box, it would be on the server if anything, not on the client viewing your webpage. If this is infact a web app, which I am guessing because of your error "An unhandled exception occurred during the execution of the current web request", then you should be using javascript for alert boxes.