"Amaryllis" <am*********@swn-dot-com.no-spam.invalid> wrote in message
news:40**********@Usenet.com...
Hello,
I'm trying to check for changes made to a textbox before exiting a
page. If there are changes made, I'm using a messagebox to ask if
the user is sure they want to discard changes made in order to go to
the other page. My problem is that if I try to capture a response, I
get this error messge:
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.
Could someone tell me what this means and if there is a way to get
around this?
You are using System.Windows.Forms.MessageBox. You cannot use anything from
System.Windows.Forms within a Web Form.
Also, I strongly suggest that you abandon the idea of duplicating this sort
of rich client functionality in a web form. If you do, you will find
yourself on a wild goose chase.
If you insist on attempting to duplicate such features, you will need to do
a lot of programming in JavaScript on the client. You will then get to
experience the differences between browsers in their handling of JavaScript.
--
John Saunders
johnwsaundersiii at hotmail