How to add a new line into Display Attribute, Name field
问题 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] [Display(Name = "Staff Id (format \"9999\")")] [StringLength(10)] [UIHint("StaffId")] public string StaffId { get; set; } What I would like to do is to have the name display on two lines with line break right after "Id" text. So it would display as Staff Id (format "9999") Is there a way to do this? 回答1: [Required] [Display(Name = "Staff Id