Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Model Binding Checkboxes in MVC

AddThis Social Bookmark Button
Just so I don't forget, again, it's as simple as this: Controller: public class HomeController : Controller     {         public ActionResult Index()         {             return View(new []{"one", "two", "three"});         }         [HttpPost]         public ActionResult Index(IEnumerable items)         {             return View("Result", items);         }     } View: @model IEnumerable @using (Html.BeginForm()) {     foreach (var item in Model)     {     @item      }      }  

Home : Blog List : .Nettuce : Model Binding Checkboxes in MVC