title: Can you remove the HTML Field Prefix from strongly typed models in MVC 3?
body: <p>I have a view model like this:</p>
  
  <pre><code>public class EditVM
  {
    public Media.Domain.Entities.Movie Movie       { get; set; }
    public IEnumerable&lt;Genre&gt;          Genres      { get; set; }
  }
  </code></pre>
  
  <p>Movie is the real entity I wish to edit. Genres is simply present to populate a drop down. I would prefer that when I call:</p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.Movie.Title)
  </code></pre>
  
  <p>inside my strongly typed view that the input control have a name = <code>"Title"</code> instead of <code>"Movie.Title"</code></p>
  
  <p>I do not wish to split my view into partial views or lose my strongly typed view by using <code>ViewData</code> or the like.</p>
  
  <p>Is there a way to express to the View that I do not wish to have the <code>Movie.</code> prefix? I noticed that you can set:</p>
  
  <pre><code>ViewData.TemplateInfo.HtmlFieldPrefix = "x";
  </code></pre>
  
  <p>in the controller, but unfortunately it seems only to allow adding an <strong>additional</strong> prefix. Setting it to <code>""</code> does nothing.</p>
  
  <p>Is there any work around for this? Or am I stuck with the unfortunate prefix that isn't really necessary in this case if I wish to keep strongly typed views and lambdas?</p>
  
  <p>Thanks for any help.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Here's the controller actions to maybe make things a bit clearer.</p>
  
  <pre><code>public ActionResult Edit(int? id)
  {
    var vm = new EditVM
    {
      Movie  = id.HasValue ? _movieSvc.Find(id.Value) : new Movie(),
      Genres = AppData.ListGenres()     
    };
    return View(vm);
  }
  
  [HttpPost]
  public void Edit([Bind(Prefix = "Movie")]Movie m)
  {
     _movieSvc.AddOrUpdateMovie(m); //Exceptions handled elsewhere
  }
  </code></pre>