473,387 Members | 1,791 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,387 software developers and data experts.

Client side messagebox

5
Hello

I have a messagebox showing on the click of a button
it is a yes/no message box and so far it works in the localhost with MessageBox.Show

but when I publish the aspx page and run it on the server i get this error

"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. "

can anyone give me pinters what to do?

thanks for any help
Probi
Aug 4 '08 #1
1 2053
DrBunchman
979 Expert 512MB
MessageBox.Show will not work for an ASP.NET page because it is a server side message box.

You need to use client side script to fire a message box. Try using the following function instead when you want to display an alert style messagebox:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Message(ByVal sMessage As String)
  2.     Dim myscript As String = "alert('" & sMessage & "');"
  3.     Page.ClientScript.RegisterStartupScript(Me.GetType(), "myscript", myscript, True)
  4. End Sub
If you want to display a confirmation style messagebox then add the following to your asp.net server control:
Expand|Select|Wrap|Line Numbers
  1. OnClientClick="return confirm('Are you sure you want to proceed?');"
Hope this helps,

Dr B
Aug 5 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ME | last post by:
In my server app I perform the following: //------------------------------------------- remoteObject remoteObj = new remoteObject(); ChannelServices.RegisterChannel(new TcpChannel(tcpPort));...
7
by: Ken Allen | last post by:
I have a .net client/server application using remoting, and I cannot get the custom exception class to pass from the server to the client. The custom exception is derived from ApplicationException...
2
by: Rick Strahl [MVP] | last post by:
Run into an interesting problem today with a client of mine: They have an ASP.Net form that they want to drive through a client side HTTP interface. I know a Web Service would be a better way to...
5
by: Dave | last post by:
I have a vb routine below where I'm trying to capture a name from a javascript prompt box. My application is inline VB on Visual Studio 2003. The prompt box does display, but when I type a...
0
by: Usman | last post by:
Hi I'm having problem with a scenarion where I have a server written in C# and client written in VC6++. Here is the server code that i'm using including the Callback function for handling...
10
by: Betina Andersen | last post by:
I have inherited a VB.NET dll that I am using from common asp. My problem is to get the messages from the dll to the Ie client, I can see the messages in the Eventlog on the IIS server so I know...
5
by: raghubr | last post by:
Hi all, Can any one pls guide me through..I need to transfer the file from server to client and client to server using sockets in an Asynchronous mode so this file transfer doesn't hinder the...
3
by: hhendrickx | last post by:
Hello, I have a problem showing a multi-line client-side messagebox. Single-line works ok but multi-line does not. How can I show multi-line client-side messageboxes? Code: String message =...
9
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I want to download pfx from my asp.net server, add the pfx to client's X509Store as a trusted publisher, Is it possible? my func in aspx is like this: void InstallCertification() { try{...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.