modelstate
What determines the key in the ModelStateDictionary for Items of Collection Properties
If this is my view model: public class ViewModel{ public string SimpleProperty{get;set;} public SubViewModel ComplexProperty{ get;set;}[详细]
2023-02-18 14:17 分类:问答MVC2 : Troubles in edit state with modelstate using a structure
I have the following problem. I\'m using a structure (not a single table) to display my edit page. When Im submitting my page, (an ascx page), after having filled all the fields, I fill some ModelS[详细]
2023-02-15 07:28 分类:问答Saving entities with foreign key in ASP.NET MVC
I need some help doing something I am assuming is simple. I am using ASP.net MVC 3 with CodeFirst (CTP5)[详细]
2023-02-10 06:34 分类:问答ASP.NET MVC ModelState.IsValid doesnt work
I\'ve this controller\'s method for create [HttpPost] public ActionResult Create(Topic topic) { if (ModelState.IsValid)[详细]
2023-02-05 19:16 分类:问答ASP.NET MVC - How to Preserve ModelState Errors Across RedirectToAction?
I have the following two action methods (simplified for question): [HttpGet] public ActionResult Create(string uniqueUri)[详细]
2023-02-04 09:16 分类:问答How to call ValidationAttributes manually? (DataAnnotations and ModelState)
We have a need within some of our logic to iterate through the properties of a model to auto-bind properties and want to extend the functionality to include the new dataannotations in C# 4.0.[详细]
2023-01-30 01:24 分类:问答Model is not automatically validated when unit testing
Here\'s part of a controller action: [HttpPost] public ActionResult NewComplaint(Complaint complaint) { if(!ModelState.IsValid)[详细]
2023-01-29 09:43 分类:问答ASP.NET MVC 2 Model Errors with Custom Exceptions
I have a custom exception class: public class MyException: Exception { public MyException(MyExceptionEnum myError) : base(myError.ToDescription()) { }[详细]
2023-01-22 07:14 分类:问答How do you validate multi-part models?
I\'m working on a really big order form with a bunch of multi-part data that\'s submitted all at once. I\'m using that trick where you render 30-40 item rows in the HTML and allow the user to \"show\"[详细]
2023-01-21 05:24 分类:问答Manually adding text to html.ValidationSummary?
I am rather new to mvc2 and when following a writeup on data annotations and such, I came across a bit of code that let me manually 开发者_运维知识库add a line of text to the validation summary.[详细]
2023-01-21 03:34 分类:问答