Model binding broke after upgrade to Visual Studio 2010

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-05-19T15:36:52Z Indexed on 2010/05/19 16:10 UTC
Read the original article Hit count: 164

I have an ASP.net MVC 1.0 VS2008 application that I just opened in Visual Studio 2010. When I did this Studio upgraded the app from VS2008 to the VS2010 project. It also upgraded the MVC references from 1.0 to 2.0.

In my app I have a class for a form post, I then use the class for the model binding in the Action method so it will auto populate the values. This worked fine in mvc 1.0 but now it does not work in 2.0 after the upgrade.

Does does anyone know why? Or where I should look to resolve this?

Here is my class,

 public class Add_Postal_Form_Input
    {
        public string ACTION_RDO   { get; set; }
        public string POSTALSELECT { get; set; }
        public string CNY_CD { get; set; }
        public string S_PST_LOW { get; set; }
        public string R_PST_LOW { get; set; }
        public string R_PST_HI { get; set; }
        public string G_PST_LOW { get; set; }
        public string G_GRP_CD { get; set; }
        public string CAT_CD { get; set; }
        public string SUB_CD { get; set; }
        public string ATTR_VAL { get; set; }
        public string NBG_HR { get; set; }
        public string NBG_MN { get; set; }
        public string REC_STT_DT { get; set; }
        public string REC_END_DT { get; set; }
        public string DEFAULT_DATE { get; set; }
    }

Here is the method,

[AcceptVerbs("POST")]
public PartialViewResult AddData(Add_Postal_Form_Input FORM_IN) 
{

Thanks

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about visual-studio-2010