谁能告诉我这个的VB等价物是什么:
@model DateTime
Using Date Template
@Html.TextBox("", String.Format("{0:d}", Model.ToShortDateString()),
new { @class = "datefield", type = "date" })
我试过了:
@model DateTime
使用日期模板
@Html.TextBox("", String.Format("{0:d}", Model.ToShortDateString()), New With {Key .class = "datefield", Key .type = "date"})
...但错误是:NullReferenceException 未被用户代码对象变量处理或未设置块变量。
它来自教程:使用 HTML5 和 jQuery UI Datepicker Popup Calendar with ASP.NET MVC - Part 4