Easiest way to create a cascade dropdown in ASP.NET MVC 3 with C#
As always you start with a model: public class MyViewModel { public int? Year { get; set; } public int? Month { get; set; } public IEnumerable<SelectListItem> Years { get { return Enumerable.Range(2000, 12).Select(x => new SelectListItem { Value = x.ToString(), Text = x.ToString() }); } } } then a controller: public class HomeController : … Read more