コントローラにHTMLテキストボックス値を取得したいとします。以下は、私の見解コードであるコントローラのHTMLコントロール値を取得する
@using (Html.BeginForm("SaveValues", "TestGrid",FormMethod.Post))
{
<table>
<tr>
<td>Customer Name</td>
<td>
<input id="txtClientName" type="text" />
</td>
<td>Address</td>
<td>
<input id="txtAddress" type="text" /></td>
<td>
<input id="btnSubmit" type="submit" value="Submit" /></td>
</tr>
</table>}
[HttpPost]
public ActionResult SaveValues(FormCollection collection)
{
string name = collection.Get("txtClientName");
string address = collection.Get("txtAddress");
return View();
}
は私が
あなたは私の人生を保存しました))) –