title: ASP.net MVC wont deserialize a class in http post
body: <p>I have this controller:</p>
  
  <pre><code>public JsonResult Register(string step , GlobalOnBoardingDataModel data){}
  </code></pre>
  
  <p>the MVC wont deserialize the <code>data</code> variable. 
  The <code>step</code> variable is getting the post var into it.</p>
  
  <p>I have other classes that are been deserialized fine, but this one won't.
  this is the class:</p>
  
  <pre><code>public class GlobalOnBoardingDataModel : BaseStepDataModel
      {
          public string Email = string.Empty;
          public string FirstName = string.Empty;
          public string LastName = string.Empty;
          public string PhoneAreaCode = string.Empty;
          public string PhoneCountryCode = string.Empty;
          public string PhoneNumber = string.Empty;
          public string CountryShortName = string.Empty;
          public string AccountCurrency = string.Empty;
          public float InitialDepositAmount = 0;
          public string Address = string.Empty;
          public string City = string.Empty;
          public string State = string.Empty;
          public string DateOfBirth = string.Empty;
          public string CreditCardNumber = string.Empty;
          public string CreditCardExperationDate = string.Empty;
          public bool RiskDisclosure = false;
          public bool Beneficiary = false;
          public string CVVNumber = string.Empty;
          public bool Subscribe = false;
      }
  </code></pre>
  
  <p>BTW, The location of the var is not an issue, seccond place working with other cases.</p>
  
  <p><strong>Edit</strong>
  these are the values (from chrome):</p>
  
  <pre><code>step:one
  FirstName:kjh
  LastName:
  CountryShortName:IL
  PhoneNumber:
  PhoneAreaCode:
  PhoneCountryCode:
  Email:Test@test.com
  </code></pre>
  
  <p>Thanks</p>