Posted on: 11/22/2012 4:44:47 AM | Views : 483

Hi there,
Consider this class:
public class Review { public int ReviewId { get; set; } [DisplayName("Digning Date")] [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)] [DataType(DataType.Date)] public DateTime Created { get; set; } [Range(1, 10)] public int Rating { get; set; } [Required] [DataType(DataType.MultilineText)] public string Body { get; set; } public int RestaurantId { get; set; } public Restaurant Resturant { get; set; } } If you look at the code you see some property has something called  'attribute' in the form [AttributeName ...

Go to the complete details ...