title: Razor Pages - Can't pass different model to partial view within a page handler
body: <p>I'm not quite sure if this is possible to do but wanted to check. I have a razor page that has a few different handler methods. In some of them, I return a partial view result.</p>
  
  <p>Example:</p>
  
  <pre><code>public class BoardMeetingsModel : PageModel
  { 
        //ctor
        //properties
  
        public IActionResult OnGetFetchCreateMeetingPartial()
            {
               return Partial("_CreateMeetingPartial", new ManipulationDto());
            }
  }
  </code></pre>
  
  <p>My partial view is setup as below:</p>
  
  <pre><code>@using Models.ManipulationModels
  @model ManipulationDto
  </code></pre>
  
  <p>It's a partial page so I am not using the @page directive (partial page is named <code>_CreateMeetingPartial.cshtml</code>. When I pass in the ManipulationModel though, I run into below error</p>
  
  <pre><code>The model item passed into the ViewDataDictionary is of type 'Models.ManipulationDto', but this ViewDataDictionary instance requires a model item of type 'Pages.BoardMeetingsModel'.
  </code></pre>
  
  <p>I am not calling the partial with my razor page. I am directly returning a partial page because I am consuming the returned data in a javascript modal. Is it even possible to override this behavior? By default it always expects the base <code>PageModel</code> (i.e. <strong>BoardMeetingsModel</strong>) to be passed in. </p>
  
  <p>I'm surprised that even though I am explicitly passing in a model that exists, the partial view is still expecting a pagemodel instead of the model I explicitly stated for the partial view. </p>