I want to show any type of message using MessageBox in Windows Server 2008 R2 with ASP.NET using C#.
I use bellow this code:
MessageBox.Show("Registration Successfully Completed", "Success!!", MessageBoxButtons.OK, MessageBoxIcon.Information);
But show error:(bellow):
But show error:(bellow):
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.
Please solve this problem.
Abhay ShankerPosted Jun 14, 2014, 11:34 AM
but the best approach to show message in asp.net is to use javascript from server side as below
Satyapriya NayakPosted Jun 14, 2014, 9:35 AM
http://www.codeproject.com/Articles/7525/Simple-MessageBox-functionality-in-ASP-NET
http://www.codeproject.com/Tips/370157/A-Windows-Form-like-MessageBox-for-ASP-NET-Website
http://www.how-to-asp.net/messagebox-control-aspnet/