public ActionResult Index(Product product) { // Show the values we selected Response.Write(string.Join(", ", product.Type.SelectedValues)); // Set the items again as they are null and also set the selected values product.Type = AllTypeItems(product.Type.SelectedValues); return View(product); }
// GET: Home public ActionResult Index() { // Setup product var product = new Product(); // Setup the checkbox list product.Type = AllTypeItems(); return View(product); }