Html.LabelFor Specified Text

You use System.ComponentModel.DataAnnotations.DisplayAttribute:

[Display(Name = "My Field")]
public string MyField { get; set; }

Setting the ResourceType property on your attribute will allow you to use a resource file.

(Prior to .NET 4 use System.ComponentModel.DisplayNameAttribute with the caveat that the display name must be a compile-time constant.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)