我有一個ASP.Net和剃鬚刀的形式。ASP.Net MVC 4 2個表單提交按鈕/動作
我需要兩種方式提交表單:一個通過Edit
操作,另一個通過Validate
操作。
我應該怎麼做呢?
我不介意爲此使用JavaScript。
編輯:
使用自定義屬性我得到這個錯誤。
行動 'Resultados' 上控制器類型 'InspecoesController' 當前請求是採用以下的操作方法之間曖昧: System.Web.Mvc.ActionResult Validar(了System.Collections.Generic.ICollection
1[Waveform.IEP.Intus.Server.Web.ViewModels.ResultadoViewModel]) on type Waveform.IEP.Intus.Server.Web.Controllers.InspecoesController System.Web.Mvc.ActionResult Resultados(System.Collections.Generic.ICollection
1 [波形。在類型IEP.Intus.Server.Web.ViewModels.ResultadoViewModel])Waveform.IEP.Intus.Server.Web.Controllers.InspecoesController
對於MVC 6請參見http哪個按鈕被點擊的操作方法://計算器。 com/questions/36555265/asp-net-mvc-core-6-multiple-submit-buttons – Softlion 2016-12-21 17:29:16