tags:

views:

41

answers:

1

I want to use checkbox in my detail view for the bit true or false field. How would i do that .

EDIT

public ActionResult Details(int id)
{
    Groups group = _db.Groups.First(c => c.int_GroupId == id);
    var checkBox = Request.Form["bit_Active"];
    if (checkBox == "on")
    {

    }

    return View(group);
}

View:

<input type="checkbox" name="bit_Active" />

How will I pass the database value to the view

+2  A: 

How to handle checkboxes in ASP.NET MVC forms?

CD