Click here to Skip to main content
15,913,307 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
MVC Controller :

MessageBox is coming behind the page.

I want Message Box to come front please advise.


What I have tried:

if (MessageBox.Show("Are you sure you want Continue?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
   return View("Index");
}
Posted
Updated 16-Jun-17 2:36am
Comments
Karthik_Mahalingam 16-Jun-17 4:39am    
dont mix windows and web, use Window confirm() Method[^]

1 solution

This only appears to be working because you are developing on your local machine. When you deploy this code to a server the message box will appear on the server and there will be no-one there to click "OK".

Asking the user to confirm that they want to continue with an action | The ASP.NET Forums[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900