title: Two ViewModels for one View
body: <p>I am developing a Web-App using ASP.NET MVC and I've been trying to avoid  using the ViewBag, therefore I created few viewmodels to populate my drop-downs and in general to pass the data I need in my views. At the same time I would like to keep the data binding clean and avoid properties that will not be bound to (without using include/exclude attributes) and I've been told that obviously returnmodels are great for that purpose.</p>
  
  <p>So is creating two independent models for one view a bad idea? One with all the data that needs to be displayed and another one only with the fields from my form or is this an excess of form over substance and should I reconsider changing my design? </p>
  
  <p>Edit: A quick example because I'm not too good at explaining</p>
  
  <pre><code>class ViewModelA{ // passed to the view and then bound to when form is submitted
      List&lt;KeyValuePair&lt;int, string&gt;&gt; DropDownValues; // will be always empty while databinding
      int SelectedValue; // will be always 0 when passed to the view
      ...
  }
  </code></pre>
  
  <p>Should I replace ViewModelA with </p>
  
  <pre><code>class ViewModelB{ // contains data passed to the view
      List&lt;KeyValuePair&lt;int, string&gt;&gt; DropDownValues;
      ...
  }
  
  
  class ReturnModel{ // contains data returned from the view
      int SelectedValue;
      ...
  }
  </code></pre>
  
  <p>Obviously here I could just bind directly to my model but let's assume it's more complex and the data has to be processed before saved.</p>