में 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();
}
मैं शून्य मान हो रही है
आपने अपना जीवन बचाया)) –