问题描述: 在ASP.Net Core Razor页面中使用Kendo DateTimePicker时,无法更新模型。
解决方法:
@model YourNamespace.YourModel
[HttpPost]
public IActionResult YourAction(YourModel model)
{
if (ModelState.IsValid)
{
// 执行保存操作
// ...
return RedirectToAction("Index");
}
return View(model);
}
通过以上步骤,你应该能够在ASP.Net Core Razor页面中使用Kendo DateTimePicker控件并成功更新模型。如果问题仍然存在,请检查模型属性是否正确绑定,并确保Kendo相关的脚本和样式被正确引用。