1.主页面传递参数
url: '@Url.Action("WaterLoad")' + '?year=' + year + '&fanwei=' + fanwei,
2.控制器里接收参数
public ActionResult WaterLoad(int year,string fanwei)
{
ViewBag.year = year;
ViewBag.fanwei = fanwei;
return View();
}
3.子页面设置combobox的值
//根据主页面设置查询条件的值
$("#fanwei").combobox("setValue", '@ViewBag.fanwei');
$("#time").combobox("setValue", '@ViewBag.year');