【发布时间】:2012-05-10 02:14:36
【问题描述】:
谁能告诉我这个的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 未设置对象变量或 With 块变量。
来自教程:Using the HTML5 and jQuery UI Datepicker Popup Calendar with ASP.NET MVC - Part 4
【问题讨论】:
标签: asp.net asp.net-mvc-3