'Confirmation Dialog from MVC controller
I want to read excel and count number of rows in excel and show user message to confirm number of rows to upload. I was just looking for help how to show message from controller after reading excel count.
public ActionResult UploadAccountCreation(FormCollection form)
{
if (Request.Files.Count> 0 || Request.Files[0].ContentLength > 0)
{
// Read Excel Count
// Show Message to user "Are you sure you want to upload X number of account"
if(yes)
{
// Code for yes
}
}
}
Solution 1:[1]
You can call the javascript method like in this post to get the alert with Yes Or No options based on your excel count.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | TechieWords |
