Khumana Ram
How do you handle multiple submit buttons inside the single form in ASP.NET MVC ?Eg. @using (Html.BeginForm("Index", "Home", FormMethod.Post)) {button type="submit" id="btnApprove" value="Approve"> Approvebutton type="submit" id="btnReject" value="Reject"> Reject}
By Khumana Ram in .NET on Jul 24 2015
  • Manthan Makani
    Jun, 2018 5

    We can fetch the clicked button's value from the actionmethod Index as below.public ActionResult Index(string btnValue) {if (btnValue == "Approve"){return "Approve Clieked";}else if (btnValue == "Reject"){return "Reject Clieked";} }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS