| | |
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 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv gridview gudi iis javascript list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers





