Results 1 to 2 of 2

Thread: error when try to run msgbox code

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    24

    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:
    Last edited by dan_nial; Feb 20th, 2007 at 11:09 PM.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width