到使用Razor的MVC 3。 您可以找到我想做的全文here 最佳答案 @model DateTime? @Html.TextBox("", (Model.-6ren">
gpt4 book ai didi

asp.net-mvc - 具有DateTime的MVC 3编辑器模板

转载 作者:行者123 更新时间:2023-12-03 11:35:59 25 4
gpt4 key购买 nike

我想从MVC2更改此代码

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime?>" %>

<%=Html.TextBox("", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty), new { @class = "datePicker" }) %>

到使用Razor的MVC 3。

您可以找到我想做的全文 here

最佳答案

@model DateTime?

@Html.TextBox("", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty), new { @class = "datePicker" })

关于asp.net-mvc - 具有DateTime的MVC 3编辑器模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4249955/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com