public ActionResult ComboboxFor(ComboboxModel model) { //posted value is obtained from the model model.data = datasource; model.val = model.val; return(View(model)); }
public ActionResult ComboboxFor() { ComboboxModel model = new ComboboxModel(); model.data = datasource; model.val = "Badminton"; return(View(model)); }