title: MVC View Inheritance
body: <p>For Example:
  Let's say that I want to return a <strong>view</strong> that displays a list of cars and also show a section of dealers in your area.  These are two disjointed pieces of data.</p>
  
  <p>My <strong>view</strong> inherits a list of cars like the following:</p>
  
  <pre><code>public partial class CarLot : ViewPage&lt;List&lt;Cars&gt;&gt;
  {
  
  }
  </code></pre>
  
  <p>Now from the <strong>controller</strong> I can return the <strong>view</strong> like the following:</p>
  
  <pre><code>return View(Model.GetCars());
  </code></pre>
  
  <p>To render this, my markup would look something like the following:</p>
  
  <pre><code>&lt;% foreach (Car myCar in ViewData.Model)
  {some html here}
  %&gt;
  </code></pre>
  
  <p>This takes care of the list of cars, but my question is, how do I handle the list of dealers?  Does the <strong>view</strong> support multiple inheritance or am I going to have to hit the <strong>model</strong> again form the markup?  I know it can be done that way, but am not sure if it is the best practice.</p>