public ActionResult Multiple() { // Setup product var product = new Product(); // Setup the checkbox list product.Type = AllTypeItems(); return View(product); }
public ActionResult Multiple(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); }
public ActionResult Index(Product product) { // Show the values we selected Response.Write(product.Type.SelectedValue); // Set the items again as they are null and also set the selected values product.Type = AllTypeItems(product.Type.SelectedValues); return View(product); }