1
Reply

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}

Khumana Ram

Khumana Ram

9y
1.1k
0
Reply

    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";} }