473,395 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

UserInteractive Mode

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?
Thanks

Nov 18 '05 #1
2 9565
"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
Nov 18 '05 #2
What I've done in the past is create a phony message box using a panel on my web page. I keep it hidden. When I need to pop it up I set the enable property of everything else on the page (easy is everything else is in another panel since you just set the other panels Enable property to false) then I make my Messagebox Panel visible. I then process the OK and Cancel buttons.
--
William Main
"Amaryllis" wrote:
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?
Thanks

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mark S | last post by:
I have a db maintenance plan which is set to backup (then truncate hopefully) the transaction log. In order to backup a transaction log the db must be in single user mode so the maint. plan fails. ...
6
by: Baskar RajaSekharan | last post by:
In C-sharp, I wnat to know whether the Component is compiled in Debug Mode or Run Mode through Code. How is it possible? Is there any way to Access the Config file and check? Please let me know...
9
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and...
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
0
by: Elaine | last post by:
I have a truly curious problem with HtmlHelp and Sibling Mode in Visual C++ ..Net 2003 in an MFC app. Sibling mode allows the help viewer to display on top of the app, but if the app is clicked,...
0
by: KKuser | last post by:
Hello: On my aspx file I have a button, and in my aspx.vb file I want it to show a messagebox says "clicked". When I click the button, the error page shows and says that the "UserInteractive" is...
3
by: John J Lee | last post by:
Is it possible to get doctest-mode to work with mmm-mode and python-mode nicely so that docstrings containing doctests are editable in doctest-mode? In my utter e-lisp ignorance, I tried this: ...
1
by: Henry Lee | last post by:
hi , all This is driving me crazy , I use msgbox method in .net 2.0 environment and it is running fine on my IIS (Windows 2000) until today. The error is like "Showing a modal dialog box or form...
7
by: Michele Simionato | last post by:
I have noticed that the python-mode for Emacs that comes with the latest Ubuntu is missing the class browser. Moreover if works differently from the python-mode I was used to (for instance CTRL-c-c...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.