Home MVC: How to display a modal popup after calling the ActionResult

# MVC: How to display a modal popup after calling the ActionResult

Marwa Kesraoui
1#
Marwa Kesraoui Published in 2018-02-13 09:55:02Z
 I need to display a modal popup once a button is pushed, I made it with JS, but the issue that the popup is displayed before the ActionResult is executed, so I had many bugs. If I remove the JS function from the button, the page is displayed correctly, but not a popup. A full .cshtml vue. Here is the JS part:   Here is the ActionResult in the controller: [HttpGet] public PartialViewResult Result() { try { return PartialView("uploadFormSuccess"); } catch (Exception ex) { _logger.Error(ex.Message); return PartialView("Error"); } }  Does anybody know how to "oblige" the action of the button to go to controller first and display a modal popup?
Vincent Zhang
2#
Vincent Zhang Reply to 2018-02-13 09:59:28Z
 You should use Ajax to send the request, and after the upload finished, popup your dialog.
 You need to login account before you can post.
Processed in 0.439433 second(s) , Gzip On .