I am simply devloping entry form using mvc 3. I have many text boxes,radio button, lables. so while post back data from view to controller it loses entered data. how to retain this for all postbacks? is there any mvc mechanisam avialable by default? which means by enabling some properties do we command mvc to handle state by itself?
i 无意发送电文。 除此以外,哪些缺省机制可在 mvc3中使用?
Update:
@using (Html.BeginForm())
{
<table>
<tr>
<td>
@Html.TextBox("txtTitle")
@Html.CheckBox("chkOption")
</td>
<td>
@Html.TextBox("txtDetails")
@Html.DropDownList("drpList")
</td>
<td>
<input type="submit" value="Cancel" name="action" />
<input type="submit" value="Create" name="action" />
</td>
</tr>
</table>
}
如何保持所有员额的入门和选定价值的状况?