'public string Country;
public List<SelectListItem> DdlCountryList { get; set; }
public string State;
public List<SelectListItem> DdlStateList { get; set; }
private List<SelectListItem> _listItems;
public string District = "District";
public List<SelectListItem> DdlDistrictList { get; set; }
public string Village = "Village";
public IEnumerable<SelectListItem> DdlVillageList { get; set; }
public string Crop = "Crop";
public IEnumerable<SelectListItem> DdlCropList { get; set; }
public string Year = "Year";
public IEnumerable<SelectListItem> DdlYearList { get; set; }
public string ProductionCode = "ProductionCode";
public IEnumerable<SelectListItem> DdlProductionList { get; set; }
public string Season = "Season";
public IEnumerable<SelectListItem> DdlSeasonList { get; set; }'
> Tha Above is My Model GlobalSearchModel
> on load Iam filling Values,.. and By using Jquery change function i am calling Values how to get the Id's of Selected DropDownValues
public ActionResult Index()
{
GlobalSearchModel objGlobalSearchModel = new GlobalSearchModel();
return View(objGlobalSearchModel);
}
这是我的控制器的 Action 方法,我在 GlobalSearchModel() 的构造函数上填充 DropDownList 的默认值;像“选择”
[HttpPost]
public ActionResult FilterMapDetails(GlobalSearchModel objGlobalSearchModel)
{
//Logic GoesHere then i will return values
return View("Index", objGlobalSearchModel);
}
以上是我提交时调用的 PostMethod,在此先感谢