title: How to bind a <input type = "text" .. with my property in ViewMode
body: <p>How to bind to an <code>input[type='text']</code> field with a property of type <code>Subsidiary</code>
  When user register a party, one of the fields is the subsidiary that was the party</p>
  
  <p>Instead of putting a DropDown, Select or Radio I put a <code>input[type='text']</code> field
  and when the user starts typing the name of the subsidiary, the <a href="http://jqueryui.com/demos/autocomplete/" rel="nofollow">autocomplete of jQueryUI</a> shows the list of subsidiaries have filtered </p>
  
  <h2>Code</h2>
  
  <p>To accomplish these tasks, I have:</p>
  
  <p><strong>ViewModel</strong></p>
  
  <pre><code>public class PartyViewModel
  {       
      [UIHint("SubsidiarySelect")]
      public Subsidiary Subsidiary { get; set; }
  }
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <p>HTML generated by EditorTemplates of <code>SubsidiarySelect</code></p>
  
  <pre><code>&lt;input id="Subsidiary_Title" name="Subsidiary.Title" type="text" value=""&gt;
  &lt;input id="Subsidiary" name="Subsidiary" type="hidden" value="00000000-0000-0000-0000-000000000000"&gt;
  </code></pre>
  
  <p><code>#Subsidiary_Title</code> > is used to display the selected subsidiary<br>
  <code>#Subsidiary</code> > saves the selected code Guid of subsidiary</p>
  
  <p><strong>Controller</strong></p>
  
  <p>My control is nothing special.
  I would like the property <code>Subsidiary</code> in my <code>PartyViewModel</code> class would have filled.</p>
  
  <pre><code>[HttpPost]
  public ActionResult Nova(PartyViewModel model)
  {
      if (ModelState.IsValid)
      {
          //.....
      }
  }
  </code></pre>
  
  <h2>Questions</h2>
  
  <p>I thought of creating a <code>SubsidiaryBinder: IModelBinder</code> so that when the post was made, I would fill the <code>Subsidiary</code> property with the Database values (as have the ID)</p>
  
  <ol>
  <li>If this is the solution, then how to create a binder to run only in the class PartyViewModel  </li>
  <li>How to automatically retrieve the values ​​from the database for the <code>Subsidiary</code> property class <code>PartyViewModel</code> when making a post?</li>
  </ol>