【发布时间】:2010-08-15 00:41:18
【问题描述】:
public static string ProductHelper(this Product p) {
// Need to get the DisplayName value for p.Name property
}
编辑:
[MetadataType(typeof(ProductMetadata))]
public partial class Product {
public class ProductMetadata {
[DisplayName("Product name")]
public object Name { get; set; }
}
}
【问题讨论】:
标签: asp.net-mvc-2 data-annotations