none
Show MessageBox in MVC controller C# RRS feed

  • Question

  • I am using MessageBox and DialogResult in my MVC application. It worked perfectly locally but after deploying my application is failing. I looked online for solutions and one of them said that MessageBox will not work on server side once deployed for web application.

    So is there any way to show a custom message box but not in Jquery, but in C# for mvc web app.

    Thanks In Advance.

    • Moved by CoolDadTx Wednesday, February 28, 2018 3:08 PM ASP.NET related
    Tuesday, February 27, 2018 5:44 AM

All replies

  • So is there any way to show a custom message box but not in Jquery, but in C# for mvc web app.

    No, it has to be done on client-side using JavaScript or a JS library.  The MVC controller on the server-side can call JavaScript on the client-side to show an Alert box, and there are articles that show how to do it.

    You can also post to the MVC forum in ASP.NET forums. 

    http://forums.asp.net/

    Tuesday, February 27, 2018 8:15 AM
  • Please post questions related to MVC in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, February 28, 2018 3:07 PM