title: Problems using TextBoxFor with viewModels in MVC
body: <p>I recently started to use a viewModel. Here's the viewModel I am using:</p>
  
  <pre><code>public class ContentViewModel
      {
          public Content Content { get; set; }
          public bool UseRowKey { 
              get {
                  return Content.PartitionKey.Substring(2, 2) == "05" ||
                     Content.PartitionKey.Substring(2, 2) == "06";
              }
          }
          public string TempRowKey { get; set; }
  
      }
  </code></pre>
  
  <p>I changed my razor views from:</p>
  
  <pre><code>@model WebUx.Content
  
  &lt;div class="colx2-left"&gt;
      &lt;label for="complex-fr-url" class="required"&gt;Order&lt;/label&gt;
      @Html.TextBoxFor(model =&gt; model.Order)
  &lt;/div&gt;
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>@model WebUx.Areas.Admin.ViewModels.Contents.ContentViewModel
  
  &lt;div class="colx2-left"&gt;
      &lt;label for="complex-fr-url" class="required"&gt;Order&lt;/label&gt;
      @Html.TextBoxFor(model =&gt; model.Content.Order)
  &lt;/div&gt;
  </code></pre>
  
  <p>Now my views fail with the following message:</p>
  
  <blockquote>
    <p>Compiler Error Message: 
    CS0411: The type arguments for method System.Web.Mvc.Html.InputExtensions.TextBoxFor TModel,TProperty&gt;
    (System.Web.Mvc.HtmlHelper&lt;TModel&gt;, System.Linq.Expressions.Expression&lt;System.Func&lt;TModel,TProperty&gt;&gt;)
    cannot be inferred from the usage. Try specifying the type arguments explicitly.<br><br></p>
  </blockquote>
  
  <p>Can someone give me advice about what I should do?</p>