基本上就是标题所说的:
这必须在没有提交按钮的情况下发生。这就是我得到的,但不知道如何更进一步:
看法
<% using (Html.BeginForm("UpdateReleaseState", "Articles", new{reference=Model.Reference, CheckboxState=true})) {%>
<%=Html.CheckBox("CheckboxState", Model.DoNotCheckReleaseState)%> Do not check release state
</div>
行动
[HttpPost]
public ActionResult UpdateReleaseState(Guid reference, bool CheckboxState)
{
throw new NotImplemtedException();
}
在我看来,我正在尝试传递复选框的值,但不知道要提供什么作为参数。目前它是 check=true