为两个提交按钮命名相同
<input name="submit" type="submit" id="submit" value="Save" /><input name="submit" type="submit" id="process" value="Process" />
然后在您的控制器中获取Submit的值。仅单击的按钮将传递其值。
public ActionResult Index(string submit){ Response.Write(submit); return View();}您当然可以评估该值,以通过开关块执行不同的操作。
public ActionResult Index(string submit){ switch (submit) { case "Save": // Do something break; case "Process": // Do something break; default: throw new Exception(); break; } return View();}


