title: How to create shared views in MVC
body: <p>In my Views folder I have a several folders such as Category, Origin, Price,.... They all have a Browse.aspx file and the code in this file displays a table of products. All controllers associated with these folders use the same ViewModel, but in each view I have a repetitive code. The code is:</p>
  
  <p>Folder Category, file browse.aspx
  Folder Origin, file browse.aspx
  .....</p>
  
  <pre><code>&lt;% foreach ( var p in Model.Products) { %&gt;
      &lt;li&gt; &lt;%: p.productname + " " + p.price + " " + p.origin.originname + " " + p.category.categoryname %&gt; &lt;/li&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>How can I create a shared view and use the shared view in all these views? </p>