Can I use Entity Framework DbContext, Code First approach, Data Annotation validation and customize validation in ASP.NET Web Forms?
Can I use Entity Framework DbContext, Code First approach, Data Annotation validation and customize
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.
You can use Data Annotations present in
System.ComponentModel.DataAnnotationswith ASP.NET WebForms but only with the new ASP.NET 4.5.Check this awesome tutorial for complete details:
What’s New in Web Forms in ASP.NET 4.5
Exercise 2: Data Validation
There’s also a NugGet package that seems to do what you want:
Data Annotations Validator Control for ASP.NET Web Forms