| | |
message box
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2007
Posts: 29
Reputation:
Solved Threads: 0
hi all,
how do we display a messagebox in ASP.net. i tried in this way
MsgBox("<script language='javascript'>successfully saved</script>")
but it displays a error message saying
"
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. "
can anyone help me out in solving this problem. :!:
how do we display a messagebox in ASP.net. i tried in this way
MsgBox("<script language='javascript'>successfully saved</script>")
but it displays a error message saying
"
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. "
can anyone help me out in solving this problem. :!:
Remember that this code is running on the web server in a process that is not running as the currently logged on (to the server) user. Therefore the process will be running under its own Window Station, and will not be able to interact with the desktop in any way. Consequently, you cannot display a MessageBox on the server without setting the flags to indicate that you want to display it on the currently logged in user's Window Station (effectively the default desktop).
Typically, displaying message boxes on servers is regarded as a very bad thing, as a lot of servers are locked in computer rooms and there is no user to dismiss them. Therefore, are you really sure that you want to do this, or would you really prefer to display a message box on the browser (using client-side JavaScript)?
Source
Typically, displaying message boxes on servers is regarded as a very bad thing, as a lot of servers are locked in computer rooms and there is no user to dismiss them. Therefore, are you really sure that you want to do this, or would you really prefer to display a message box on the browser (using client-side JavaScript)?
Source
•
•
Join Date: Oct 2006
Posts: 13
Reputation:
Solved Threads: 0
•
•
•
•
hi all,
how do we display a messagebox in ASP.net. i tried in this way
MsgBox("<script language='javascript'>successfully saved</script>")
but it displays a error message saying
"
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. "
can anyone help me out in solving this problem. :!:
-------------------------------------------------------
well you can add an attribute to a button in Page_Load so a javascript function is fired to show you the message box:
button.Attributes.Add("onclick","ShowMessage();");
in JavaScript:
function ShowMessage()
{
alert("successfully saved");
}
hope this is what you need.
cheerz
•
•
Join Date: Sep 2007
Posts: 66
Reputation:
Solved Threads: 12
Showing message at server is not a good idea. u can use javascript like this
Mohammed Yousuf uddin
Software Developer
ASP.NET Syntax (Toggle Plain Text)
Me.Page.RegisterStartupScript("MessageID", "<script>errBody = 'Your Message Body'; errTitle = 'Message Box Title';</script>")
Mohammed Yousuf uddin
Software Developer
![]() |
Similar Threads
- how to print out an array in a message box (Java)
- Message Box Switch Statement (Java)
- I need the Mac OS X message box function (C)
- message box (ASP.NET)
- Time Release Message Box (C)
- download message box's events (ASP)
- repeating the whole program after pressing Yes button in the confirmation message box (Java)
Other Threads in the ASP.NET Forum
- Previous Thread: Play Video (FLV) in a WebPage
- Next Thread: How do i get to the more details page
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# c#gridviewcolumn cac checkbox click commonfunctions confirmationcodegeneration content courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dialog dropdownlist dynamically edit expose fileuploader fill flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





