Create two submit button inside the form
<form action="index"> <input type="submit" name="submitButton" value="Filter" /> <input type="submit" name="submitButton" value="Download" /> </form>on the controller action use switch case to target the final action command
public ActionResult Index(StatisticsReport stc, string submitButton) { switch (submitButton) { case "Filter" : break; case "Download": return RedirectToAction("Download", list); } } public ActionResult Download(Listlist) { return View(); }
No comments:
Post a Comment