I\'m working on an MVC3 application and am using data attributes for the display name fields on the screen. Below is a representative sample -
[Required]
[Required] [Display(Name = "Staff Id(format \"9999\")")] [StringLength(10)] [UIHint("StaffId")] public string StaffId { get; set; }
and inside your StaffId.cshtml custom editor template:
StaffId.cshtml
@model string @Html.Raw(ViewData.ModelMetadata.DisplayName) @Html.TextBox("")