在我看来,我有以下将其显示为复选框:
<td style="padding:3px"><%= Html.CheckBox("Statistik3", (Boolean)ViewData["Statistik3"], new { @tabindex = "10" })%> </td>
控制器:
[AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)]
public ActionResult FormularStatistikKennzeichen(string button, string decision1, FormEntries entries)
{
if (i > 0)
{
ViewData["Statistik3"] = true;
}
if (i == 0)
{
ViewData["Statistik3"] = false;
}
i = i + 1;
}
首先我可以将复选框初始化为真或假,但之后我无法更改和控制复选框中的值?你知道怎么做吗