What is difference between DisplayName attribute and Display attribute in ASP.NET MVC?
What is difference between DisplayName attribute and Display attribute in ASP.NET MVC?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They both give you the same results but the key difference I see is that you cannot specify a
ResourceTypeinDisplayNameattribute. For an example in MVC 2, you had to subclass theDisplayNameattribute to provide resource via localization.Displayattribute (new in MVC3 and .NET4) supportsResourceTypeoverload as an “out of the box” property.