<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%=Html.TextBox("", (Model.HasValue ? Model.Value.ToString("yyyy-MM-dd") : string.Empty), new { @class = "text-input short-input showAsCal dateVal" })%>