MVC 3 "parameterless constructor defined for this object."

While working on my MVC 3.0 project i got this shocking error when i put my grid and a BeginForm() on the same page while i was passing a List of my model to the View. so here are some steps that i do and get it fixed.

1. Add and empty constructor to your Model


public class MyModel
    {

         ////Constructor of MyModel Class

              public MyModel()
                 {
                  }
        /// End constructor


    }

Comments

Popular Posts

GREYCstoration Oil Paint plugin for Photoshop

Service Bus Gateway service stuck at Starting

PowerApps SubmitForm not clearing People Picker value

Apple iPhone sending SMS automatically 00447786205094

Download file failed signature verification and may have been tampered with - Workflow Manger 1.0 Refresh (CU2)