Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation.

Posted on 2011-02-24
3
Medium Priority
?
848 Views
Last Modified: 2012-05-11
The following code:

         MsgBox("Please select a name before saving the lock settings", vbInformation)

Produces the following error on a web page.  

"Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."

I did a little research and found suggestions stating that MsgBox is intended solely for Windows forms.  If that's the case, how do I properly call a message box from a web page?
0
Comment
Question by:jdana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 1000 total points
ID: 34974509
Yes msgbox is for windows forms only as technically you don't have an 'interactive' gui with asp.net. The most common way of doing this would be using javascript to display and alert but it would help if you posted some code so we could see what you were trying to achieve
0
 
LVL 29

Assisted Solution

by:Paul Jackson
Paul Jackson earned 1000 total points
ID: 34974859
Here's some example code :

            Dim strScript As String = "<script language=JavaScript>alert('" & strMessage & "')</script>"
            Dim cs As ClientScriptManager = aspxPage.ClientScript
            If (Not cs.IsStartupScriptRegistered(strKey)) Then
                cs.RegisterStartupScript(aspxPage.GetType(), strKey, strScript)
            End If

Open in new window

0
 

Author Closing Comment

by:jdana
ID: 35036500
Perfect.  Thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question