title: MVC HttpPost strongly typed Model null
body: <p>View Model looks like this:</p>
  
  <pre><code>public class AsmenysInfoViewModel2
  {
      public asmenys_info Asmenys_info { get; set; }
      public List&lt;miestai&gt; Miestai { get; set; }
      public string Test { get; set; }
  }
  </code></pre>
  
  <p>And there are two actions. Get and Post.</p>
  
  <pre><code>    public ActionResult Index(long? id)
      {
  
          var model = new AsmenysInfoViewModel2();
          model.Test = "Test";
          model.Asmenys_info = BllFactory.DalFactory.AsmenysInfoDal.GetById(id.Value);
          return View(model);
      }
      [HttpPost]
      public ActionResult Index(AsmenysInfoViewModel2 asmenys_info)
      {
          var model = asmenys_info;
          return View(model);
      }
  </code></pre>
  
  <p>And my view looks like this:</p>
  
  <pre><code>@model MODELS.AsmenysInfoViewModel2
  @{
      ViewBag.Title = "Index";
  }
  @using (Html.BeginForm("Index", "AsmenysInfo", FormMethod.Post))
  {
      @Html.ValidationSummary()
      @Html.TextBoxFor(m =&gt; m.Asmenys_info.adresas)       
  
      &lt;input type="submit" value="Išsaugoti" /&gt;
  }
  </code></pre>
  
  <p>Doesn't matter if I use EditorFor or TextBoxFor - result is same. My model property "Asmenys_info" on posting is always null. If my class AsmenysInfoViewModel2 would not contain asmenys_info type property and would contain only "string, int etc" (no strongly typed) - it would work.
  My question is : </p>
  
  <p><strong>How to post View Model which has strongly typed property which on posting would not be null?</strong></p>