I have checkbox. When I select the checkbox I want it to automatically change its value in the Database to true and refresh the view and invoke a JQuery method.
I also have a checkbox and label. I want the checkbox to disappear when selected and the text in the label to change.
<h2>Tasks</h2>
<fieldset>
<legend>Tasks</legend>
<table class="table">
@foreach(var item in ViewBag.x)
{
<tr class="clr">
<td style="width:520px">
@item.User.UserName
</td>
<td>
@item.date.ToString("MM/dd/yyyy")
</td>
</tr>
<tr class="clr">
<td>
@item.Discription
</td>
<td></td>
</tr>
<tr>
<td ></td>
<td>
<div><input type="checkbox" id="ch" class="ch" /><span id="d" >Done</span></div>
</td>
</tr>
}
How would I do this in JQuery or ASP MVC?