title: Pass parameter to Partial View in ASP.NET Core
body: <p>On an ASP.NET Core 2.0 application I need to render a partial view and pass a few parameters:</p>
  
  <pre><code>@Html.Partial("Form", new { File = "file.pdf" })
  </code></pre>
  
  <p>On the partial view I tried to access it using:</p>
  
  <pre><code>@Model.File
  </code></pre>
  
  <p>And I get the error:</p>
  
  <pre><code>RuntimeBinderException: 'object' does not contain a definition for 'File'
  </code></pre>
  
  <p>If I simply use on my partial:</p>
  
  <pre><code>@Model
  </code></pre>
  
  <p>I get the following printed on the page:</p>
  
  <pre><code>{ File = file.pdf } 
  </code></pre>
  
  <p>So there the model is being passed and there is a property File in it.</p>
  
  <p>So what am I missing?</p>