Hi SUJAYS,
Check this example. Now please take its reference and correct your code.
Model
public class ProductModel
{
public string Product { get; set; }
public int Code { get; set; }
public string Material { get; set; }
public int PRQty { get; set; }
}
Controller
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
return View();
}
[HttpPost]
public ActionResult Index(ProductModel model)
{
return View(model);
}
}
View
@model _155579_HTML_Table_Model_MVC.Models.ProductModel
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
</head>
<body>
@using (Html.BeginForm("Index", "Home", FormMethod.Post))
{
<table class="container">
<tr>
<td>@Html.LabelFor(model => model.Product, new { @class = "control-label" })</td>
</tr>
<tr>
<td>@Html.TextBoxFor(model => model.Product, new { @class = "form-control" })</td>
</tr>
<tr>
<td>@Html.LabelFor(model => model.Code, new { @class = "control-label" })</td>
</tr>
<tr>
<td>@Html.TextBoxFor(model => model.Code, new { @class = "form-control" })</td>
</tr>
<tr>
<td>@Html.LabelFor(model => model.Material, new { @class = "control-label" })</td>
</tr>
<tr>
<td>@Html.TextBoxFor(model => model.Material, new { @class = "form-control" })</td>
</tr>
<tr>
<td>@Html.LabelFor(model => model.PRQty, new { @class = "control-label" })</td>
</tr>
<tr>
<td>@Html.TextBoxFor(model => model.PRQty, new { @class = "form-control" })</td>
</tr>
</table>
}
</body>
</html>
Screenshot