由于不能有两个具有相同名称和签名的方法,因此必须使用
ActionName属性:
[HttpGet]public ActionResult Index(){ // your pre return View();}[HttpPost][ActionName("Index")]public ActionResult IndexPost(){ // your pre return View();}另请参阅“方法如何成为动作”

由于不能有两个具有相同名称和签名的方法,因此必须使用
ActionName属性:
[HttpGet]public ActionResult Index(){ // your pre return View();}[HttpPost][ActionName("Index")]public ActionResult IndexPost(){ // your pre return View();}另请参阅“方法如何成为动作”