Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > using message box in page unload even

Thread Tools

using message box in page unload even

Posts: n/a

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


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

>a service application.
>Any ideas how to resolve this problem?
>Thanks a lot.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What does "Page Load" and "Page Unload", "Page Life Cycle" exactlymean???? lander ASP .Net 5 03-03-2008 02:06 PM
Why my working ps/2 mouse freezes and even don't even get recon.after reboot ? demi General Computer Support 0 08-03-2007 05:28 AM
What happens between Page.PreRender and Page.Unload event? Mariella Bakker ASP .Net 1 05-08-2006 09:49 AM
Unable to delete dir even after unload/remove ... Guru Prasad ASP .Net 1 07-24-2003 11:13 PM
Even older fart, even newer newbie Stan Goodman Java 11 07-04-2003 07:32 AM