modelstate
ModelState always valid
I\'ve got something seemingly very simple not working. I have got a model public class Name: Entity { [StringLength(10), Required][详细]
2022-12-27 00:51 分类:问答How do I test ActionFilterAttributes that work with ModelState?
As suggested by (among others) Kazi Manzur Rashid in this blog post, I am using ActionFilterAttributes to transfer model state from one request to another when redirecting.[详细]
2022-12-26 03:19 分类:问答ASP.MVC 2 RTM + ModelState Error at Id property
I have this classes: public class GroupMetadata { [HiddenInput(DisplayValue = false)] public int Id { get; set; }[详细]
2022-12-25 20:34 分类:问答MVC 2 Data annotations problem
Going mad now.I have a开发者_如何学编程 MVC solution that i\'ve upgraded from MVC 1 to 2.It all works fine.... except the Validation![详细]
2022-12-24 11:33 分类:问答TDD - testing business rules/validation in ASP.NET MVC
I am using the sharp architecture so I can easily use mocks etc. in my unit tests and/or during TDD. I have quite complicated business rules and would like to test them at the controller level. I am j[详细]
2022-12-24 06:24 分类:问答asp.net MVC ModelState is null in my Unit Test. Why?
ModelState is always returning null in my unit tests. I was hoping someone could tell me why. Given the following controller:[详细]
2022-12-22 02:49 分类:问答Help figuring out why ASP.NET MVC rendering engine is producing unexpected HTML results
I have a modal popup with a form in it. When submitted via ajax (using jQuery) the form is validated and a javascript callback function checks to see if the model was valid. If so, the modal popup is[详细]
2022-12-19 19:24 分类:问答If a key does not exist in the ModelState, how can I add it? aspnetmvc1
I am trying to create a workaround in my controller which handles a bug in ASP.NET MVC v1.The bug occurs if you post a listbox which has nothing selected (http://forums.asp.net/p/1384796/2940954.aspx)[详细]
2022-12-18 05:17 分类:问答Success messages as opposed to model state error messages
For error messages, validation faults etc you have ModelState.AddErrorMessage(\"Fool!\"); But, where do you put success responses like \"You successfully transfered alot of money to your ex.\" + \[详细]
2022-12-17 23:59 分类:问答IOC on IValidationDictionary with Castle Windsor
I\'m new to Castle Windsor and am just using the latest version. I\'ve created entries for my repositories which are working fine but I have one final dependency that I\'m passing into my controller.[详细]
2022-12-16 09:28 分类:问答