将以下cshtml转换为aspx

时间:2016-10-27 20:45:53

标签: asp.net asp.net-mvc razor

需要帮助将以下内容转换为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" })%>

0 个答案:

没有答案