model-binding
Best practices for binding MVC model to WCF service through "datamodule"?
I\'m somewhat of a noob, so bear with me please. I\'m building an MVC project that gets data from a web service (WCF) as exposed by a \"datamodule\" class that passes parameters to the service. Righ[详细]
2023-03-25 21:34 分类:问答DefaultModelBinder behaviour when property absent from request
I have a model like the following: public class TestViewModel { string UpdateProperty { get; set; } string IgnoreProperty { get; set; }[详细]
2023-03-24 09:43 分类:问答Strategy to prevent users from updating readonly viewmodel properties by Role/Permission on the server
The platform is ASP.NET MVC 2. We have a user story that states: On the [view], don\'t allow a user to edit [property] unless the user is[详细]
2023-03-24 09:23 分类:问答JSON custom binder null for derived abstract class asp.net mvc
I have made a custom binder for an abstract class. The binder decides which implementation to use. It works well, but when I add a property which does not exist in the abstract class to a child class,[详细]
2023-03-24 03:48 分类:问答NullReferenceException when using custom model binder
I am trying to make a binder for an abstract class. The binder decides which implementation of the class to use.[详细]
2023-03-23 21:04 分类:问答Unit Testing Custom Model Binder - Fake HttpContext Issue
I have the following unit test defined to test my model binder: [TestMethod] public void DateTime_Works() {[详细]
2023-03-23 12:16 分类:问答ModelMetaData, Custom Class Attributes and an indescribable question
What I want to do seems so simple. In my index.cshtml I want to display the WizardStepAttribute Value So, a user will see at the top of each page, Step 1: Enter User Information[详细]
2023-03-22 21:19 分类:问答Question about JSON and Serialization
I have a strongly typed view with my viewmodel which contains an object Person and an List of Skills. Person is quite straightforward. I use Html Helpers like this @Html.TextBoxFor(m => m.Person.Fi[详细]
2023-03-22 15:47 分类:问答Is there a native way to create Client-Side models to Post to my controllers without handrolling them?
I\'m fairly new to \"real world\" MVC / .NET development (i\'ve been studying MVC since MVC 1, and i\'ve spent the last 10 years web based so i\'m not really a noober either) I\'m hoping there\'s some[详细]
2023-03-22 14:20 分类:问答How can I deserialize and model bind XML that contains multiple objects to a collection of such objects?
Currently I have a custom Model Binder and Model Binder Provider that detects \"text/xml\", deserializes it using MvcContrib (here is the code/setup), and binds it to a custo开发者_如何学运维m Model t[详细]
2023-03-21 14:33 分类:问答