Share the joy
razor:
1 2 3 4 5 | <code><form action="" method="post"> <strong> <input type="submit" value="Save" name="action:Save" /> <input type="submit" value="Send" name="action:Send" /></strong> </form> </code> |
<code><form action="" method="post"> <strong> <input type="submit" value="Save" name="action:Save" /> <input type="submit" value="Send" name="action:Send" /></strong> </form> </code>
and controller:
1 2 3 4 5 6 7 8 | <code> [HttpPost] <strong>[MultipleButton(Name = "action", Argument = "Send")]</strong> public ActionResult Send(MessageModel mm) { ... } [HttpPost] <strong>[MultipleButton(Name = "action", Argument = "Save")]</strong> public ActionResult Save(MessageModel mm) { ... } </code> |
<code> [HttpPost] <strong>[MultipleButton(Name = "action", Argument = "Send")]</strong> public ActionResult Send(MessageModel mm) { ... } [HttpPost] <strong>[MultipleButton(Name = "action", Argument = "Save")]</strong> public ActionResult Save(MessageModel mm) { ... } </code>
Share the joy