Msgbox in User COntrol

P

Peter Aitken

I have created a user control with an event procedure for a button in the
code behind module. Code in this procedure uses the MsgBox function to
display a message to the user - but whenever it is called I get an error

"It is invalid to show a modal dialog or form when the application is not
running in user interactive mode."

What does this mean? How can I display a message to the user?
 
D

Dale

The MsgBox you are trying to create would, if web applications had a server
side user interface, be created on the server, not on the client. That is
the problem. The web app has no server side user interface in which to
display a message box.

What you need to do is use the window.alert() method in client side script.
You can create that script in code on the server for loading and then
executing on the client.

Dale Preston
MCAD, MCSE, MCDBA
 
J

John Saunders

Peter Aitken said:
I have created a user control with an event procedure for a button in the
code behind module. Code in this procedure uses the MsgBox function to
display a message to the user - but whenever it is called I get an error

"It is invalid to show a modal dialog or form when the application is not
running in user interactive mode."

What does this mean? How can I display a message to the user?

Did you use MsgBox to display a message to the user in ASP?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MsgBox 2
msgbox 1
MsgBox in ASP.NET? 1
msgbox 4
MSGBOX PROBLEM 3
MSGBOX Example 2
msgbox 3
MsgBox Error 1

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top