can someone tell me the equivalent of VB of this please:
@model DateTime
Using Date Template
@Html.TextBox("", String.Format("{0:d}", Model.ToShortDateString()),
new { @class = "datefield", type = "date" })
I tried:
@model DateTime
Using a Date Template
@Html.TextBox("", String.Format("{0:d}", Model.ToShortDateString()), New With {Key .class = "datefield", Key .type = "date"})
... but with an error: A NullReferenceException was not thrown by user code Object variable or with a locked block variable.
This is from a tutorial: Using HTML5 and jQuery UI Datepicker Pop-up Calendar with ASP.NET MVC - Part 4
source
share