//Controller
[HttpGet]
public ActionResult Index()
{
ViewBag.Date = DateTime.Now;
return View()
}
//View
@Html.Kendo().DatePicker()
.Name("StartDate")
.Value(ViewBag.Date)
@Html.Action("MyAction", "MyController", new { date = ViewBag.Date })
是否可以将ViewBag.Date值更新为Html.Action中日期选择器选择的新值?
非常感谢您的帮助。