prathap k

prathap k

  • NA
  • 85
  • 6.5k

How Can I Update Check box cheked values in ASP.NET MVC

Mar 11 2016 6:34 AM
How Can I Update the Check Box values of more than one person at one click 
 
I tried by using business layer
 
@model IEnumerable<BussinessLayer.UPSettings>
@{
ViewBag.Title = "UPS";
}
<h2>UPS</h2>
<table>
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
</th>
 
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.AddR)
</th>
<th>
@Html.DisplayNameFor(model => model.EditR)
</th>
<th>
@Html.DisplayNameFor(model => model.DelR)
</th>
<th>
@Html.DisplayNameFor(model => model.ChkpwdR)
</th>
<th>
@Html.DisplayNameFor(model => model.AssignR)
</th>
<th>
@Html.DisplayNameFor(model => model.UpdateR)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
 
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.EditorFor(modelItem => item.AddR, new { @id="addr"})
</td>
<td>
@Html.EditorFor(modelItem => item.EditR, new { @id = "editr" })
</td>
<td>
@Html.EditorFor(modelItem => item.DelR, new { @id = "delr" })
</td>
<td>
@Html.EditorFor(modelItem => item.ChkpwdR, new { @id = "chpr" })
</td>
<td>
@Html.EditorFor(modelItem => item.AssignR, new { @id = "assr" })
</td>
<td>
@Html.EditorFor(modelItem => item.UpdateR, new { @id = "upr" })
</td>
</tr>
}
</table>
<div>
<input type="submit" value="Update" />
</div>
 
How Can I write the post method for getting all the values of checkbox basing on id  
 
this is the link for image view for the get method 
 
postimg.org/image/5qt5k0rd1 
 
please help me . 
 
 
 
 
 
 
 
 
 

Answers (1)