public ActionResult CascadingDropDownTest() { var model = new CascadingDropdownsModel { Countries = new List <SelectListItem> { new SelectListItem { Text = "US", Value = "US" }, new SelectListItem { Text = "UK", Value = "UK" }, }, SelectedCountry = "US", SelectedCity = "New York", //SelectedStreet = 2 }; return(View(model)); }
public ActionResult CascadingDropDownTest(CascadingDropdownsModel model) { if (!ModelState.IsValid) { return(this.View(model)); } return(RedirectToAction("CascadingDropDownTest")); }