0

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

CD..
  • 72,281
  • 25
  • 154
  • 163
maztt
  • 12,278
  • 21
  • 78
  • 153

1 Answers1

2

How to handle checkboxes in ASP.NET MVC forms?

Community
  • 1
  • 1
CD..
  • 72,281
  • 25
  • 154
  • 163