title: Remove prefix from posted data in asp.net mvc
body: <p>I have a view which looks like below. Each field has a prefix attached in the name property, but the model in my backend has property without the prefix.</p>
  
  <pre><code>@using (Html.BeginForm("Save", "Home", FormMethod.Post))
  {
      @Html.ValidationSummary(true)
      &lt;fieldset&gt;
          &lt;input type="hidden" name="prefix" value="prefix"/&gt;
          &lt;input type="text" id="prefix.Name" name="prefix.Name"/&gt;
          &lt;input type="submit" value="submit" /&gt;
      &lt;/fieldset&gt;
  }
  </code></pre>
  
  <p>My Action Method looks something like below : </p>
  
  <pre><code>public ActionResult Save([ModelBinder(typeof(CustomModelBinder))]Employee employee)
          {
              throw new NotImplementedException();
          }
  </code></pre>
  
  <p>My Model looks like :</p>
  
  <pre><code>public class Employee
      {
          public string Name { get; set; }
      }
  </code></pre>
  
  <p>Can someone help me how to achieve this through custom model binder, i want to strip prefix from each of the posted form items name.</p>
  
  <p>Posted form data :</p>
  
  <pre><code>prefix:prefix
  prefix.Name:Hello World!!
  </code></pre>
  
  <p>I tried below code as well but it's not working. Can someone explain whats wrong here.</p>
  
  <pre><code>public ActionResult Save([Bind(Prefix = "prefix")]Employee employee)
          {
              throw new NotImplementedException();
          }
  </code></pre>