using message box in page unload even

Discussion in 'ASP .Net Web Controls' started by JP, Oct 20, 2003.

  1. JP

    JP Guest

    Hey,

    I don't think you can use a MsgBox function just like
    this. You might want to try using JavaScript or JScript
    and use 'Alert' function to show the kind of message box
    you need.

    I am trying to get this to work myself and know that
    MsgBox can't be used on ASP.NET

    Regards,
    JP

    >-----Original Message-----
    >How to use msgbox in Page_unload event?
    >sub Page_unload
    >If MsgBox(,vbYesNo,)=vbYes then
    >do something
    >else
    >do something else
    >end if
    >end sub
    >
    >However when I ran the above code as asp.net, I got the
    >following 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 notification

    from
    >a service application.
    >Any ideas how to resolve this problem?
    >Thanks a lot.
    >.
    >
     
    JP, Oct 20, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guru Prasad
    Replies:
    1
    Views:
    459
    Ken Cox [Microsoft MVP]
    Jul 25, 2003
  2. Stan Goodman

    Even older fart, even newer newbie

    Stan Goodman, Jul 3, 2003, in forum: Java
    Replies:
    11
    Views:
    701
    Stan Goodman
    Jul 4, 2003
  3. Gnarlodious
    Replies:
    4
    Views:
    17,610
    elizas
    May 5, 2010
  4. Mariella Bakker
    Replies:
    1
    Views:
    5,229
    John Timney \( MVP \)
    May 8, 2006
  5. lander
    Replies:
    5
    Views:
    2,540
    Mark Rae [MVP]
    Mar 3, 2008
Loading...

Share This Page