data-annotations
Where is the whole list of default error messages for DataAnnotations at MVC 3
Yet another MVC localization question... I\'m trying to localize an ASP.Net MVC 3 app using localized Resource files to display texts in the views, as recommended.[详细]
2023-03-08 01:21 分类:问答How to get ModelState key / Model property names to match?
I have an MVC3 application, I\'m using EF4.1 Code First and POCO Classes. My question involves getting rid of hard-coded \"PropertyNames\" in my POCO Class and also pre-fixing it with the proper valu[详细]
2023-03-07 16:21 分类:问答ASP.net MVC problems when model binding with sub-class
I\'ve got two types of contact entity. One that just has an email address and one that drives from this and includes fie开发者_开发知识库lds for a postal address.[详细]
2023-03-07 08:23 分类:问答Entity Framework 4.1 - What does RequiredAttribute really mean?
I\'m having a database computed field in my Code-First model. I\'ve marked that with the DatabaseGeneratedAttribute. Do I need to specify the RequiredAttribute too?[详细]
2023-03-06 12:15 分类:问答Localizing MVC3 Validation Messages
I\'m trying to localize the validation messages of the data-annotations. I thought that it could be done as described here: Supporting ASP.NET MVC 3 Validation with Non-English Locales.[详细]
2023-03-06 08:09 分类:问答Should I store spaces in my URLs in the database? If so, how do I encode them when putting them into <a href="...">?
In my blog, I store URIs on entities to allow them be customised (and friendly). Originally, they could contain spaces (eg. \"/tags/ASP.NET MVC\"), but the W3C validation says spaces are not valid.[详细]
2023-03-06 05:19 分类:问答How to use a custom Resource provider with Attributes?
How can I use my custom method to retrieve string resources and use on properties? For example: public class Friend[详细]
2023-03-05 03:43 分类:问答Are DataAnnotations attributes cached? If so, how to switch between different cultures?
I have a site that supports both US and Canada.My zip code validation uses a custom RegEx attribute that I created to allow my RegEx pattern to be localized:[详细]
2023-03-04 19:50 分类:问答How to insert a new line in a [DisplayName] annotation
Is there anyway of putting a new line in a [DisplayName()] annotation of an mvc viewmodel?I currently have a property that is:[详细]
2023-03-04 18:43 分类:问答Get a model's property value from within a custom attribute
I have a custom attribute called FileLink that uses DisplayForModel() to generate an ActionLink to a controller with an ID value.[详细]
2023-03-04 11:18 分类:问答