Пример #1
0
        public ActionResult Multiple()
        {
            // Setup product
            var product = new Product();

            // Setup the checkbox list
            product.Type = AllTypeItems();

            return View(product);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }