Contents tagged with ViewModel

  • MVC Model Binding: Complex Objects and Collections

    Also known as "Why is my ViewModel returning null values to my HttpPost action?" The answer is at the very bottom if you feel like skipping straight to it. Let's say for example you have the following ViewModel and classes: public class MyViewModel { public ComplexObject MyComplexObject { get; set; } public int Value { get; set; } public IEnumerable<ComplexObject> … more

  • Orchard CMS: Using A Static ViewModel For Your Driver Display Method

    If you look at all the documentation about rendering shapes in Orchard, you'll see that while the Model for the partial view gets specified for the Editor methods (via shapeHelper.EditorTemplate()), all the examples I came across for Display relied on a dynamic method and generated model. For example: protected override DriverResult Display( MapPart part, string displayType, dynamic … more

  • 1