data-annotations
custom unobtrusive date validators for dates
Maybe it\'s just the way my mind works, but I have a very hard time understanding how you\'re supposed to do custom unobtrusive validators.The C# part is easy enough, but the jqueryui adapters are whe[详细]
2023-03-31 06:42 分类:问答ASP.NET MVC - "Validation type names must be unique."
I use ASP.NET MVC 3 and Data Annotations in my model, and want to retrieve the Error Messages from a database. So I wrote inherited attributes:[详细]
2023-03-31 03:29 分类:问答Is it possible to relate two entities without retrieving them from database in Entity Framework 4.1?
Consider the following scenario: public class Entity1 { virtual public Int32 ID { get; set; } [Required] virtual public String Name { get; set; }[详细]
2023-03-31 00:31 分类:问答Can a data annotation discover other annotations?
I would like to build an extended DisplayAttribute annotation that can detect if the property has the required attribute on it.And, if so and a \"* \" in front of the name to show it is required.[详细]
2023-03-30 23:31 分类:问答DataAnnotations with EntityFramework (Database First) method
I have a project in which I have a database model class provided along with a separate EDMX EF model. In the same solution, I have a web service which accesses this project along with the model class.[详细]
2023-03-30 19:18 分类:问答ASP.Net MVC 3 DataAnnotations validating List<T>
I have a View开发者_运维知识库Model that has been deserialized from JSON which looks something like this:[详细]
2023-03-30 14:21 分类:问答EntityFramework Code First: Why does Lazy Loading of Many to Many Reference fail?
My EF 4.1 Code First model should be fairly self-explanitory if you look at the code below and am trying to use DataAnnotations whenever I can.[详细]
2023-03-30 10:35 分类:问答Key column not displayed despite ScaffoldColumn(true)
I\'m working on ASP.NET MVC 3 project using EF CodeFirst. I have a simple class with few attributes set on key column:[详细]
2023-03-30 10:16 分类:问答DataAnnotations WriteOnly if property == null
I have the following property:开发者_高级运维 public virtual String Firstname { get; set; } and i only want to be able to write to the field IF it is currently null (not set), it this possible to a[详细]
2023-03-28 17:32 分类:问答EditorFor and StringLength DataAnnotations
I have the following property on my Model [Display(Name = \"MyProperty\"开发者_如何转开发)] [StringLength(10)][详细]
2023-03-28 15:13 分类:问答