需要帮助将以下内容转换为aspx
@model DateTime?
@Html.TextBox("", (Model.HasValue ? String.Format("{0:MM/dd/yyyy}", Model.Value) : string.Empty), new { @class = "date", @style = "width:100px", maxlength = "10" })
我尝试了以下但我遇到了问题
<%@ Control Language="C#" Inherits="Nullable<DateTime>" %>
<%=Html.TextBox("", (Model.HasValue ? String.Format("{0:MM/dd/yyyy}", Model.Value) : string.Empty), new { @class = "date", @style = "width:80px", maxlength = "10" })%>