title: How do I take a subset of a views Model and send the subset model to a partial view?
body: <p>How do I take a subset of a views Model and send the subset model to a partial view?</p>
  <p>I created a model, but the partial is looking for the parent model.</p>
  <p>Am I creating this secondary subset model correctly?
  How do I get the partial to see this secondary subset model?</p>
  <p>Parent View code (not all):</p>
  <pre><code>@model GbngWebClient.Models.BlogPublishedByBlogIdVM
  
          @* Create a subset model to send to the partial view. *@
          @{
              int parentBlogId = @Model.BlogPublishedByBlogId.BlogId;
              int parentLikeCount = @Model.BlogPublishedByBlogId.LikeCount;
              int parentDisLikeCount = @Model.BlogPublishedByBlogId.DisLikeCount;
              bool parentDisabledBoolean = @Model.BlogPublishedByBlogId.DisabledBoolean;
          }
  
          &lt;div class=&quot;row&quot;&gt;
              &lt;div class=&quot;col-md-1&quot;&gt;
                  @* A partial view. Sending the subset model to the partial view. *@
                  @Html.Partial(&quot;_BlogLikeAndDislike&quot;, @Model)
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;br /&gt;
  </code></pre>
  <p>Partial view code (not all):</p>
  <pre><code>&lt;div&gt;
  @* Get the parent view's values that were passed via a model. *@
     &lt;i class=&quot;BlogLike fa fa-my-size fa-thumbs-up&quot;&gt;&lt;/i&gt; | &lt;i&gt; @Model.LikeCount&lt;/i&gt;
     &lt;i class=&quot;BlogDisLike fa fa-my-size fa-thumbs-down&quot;&gt;&lt;/i&gt; | &lt;i&gt; @Model.DisLikeCount&lt;/i&gt;
  &lt;/div&gt;
  </code></pre>