title: MVC C# PagedList - PagedListPager passing parameters
body: <p>I have a paged list using unobtrusive ajax that looks like this.</p>
  
  <pre><code>@Html.PagedListPager(Model, page =&gt; Url.Action("Images", "Admin", new { imageLibrary = image.ImageLibrary, page }),
  PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(new AjaxOptions()
  { InsertionMode = InsertionMode.Replace, UpdateTargetId = "imagesContainer" }))
  </code></pre>
  
  <p>My controller looks like this:</p>
  
  <pre><code>public ActionResult Images(ImageModels image, int? page, string imageLibrary)
  {
     // do stuff here
  }
  </code></pre>
  
  <p>I was trying to pass a model to my controller, so instead of <code>imageLibrary = image.ImageLibrary</code>, I should have only needed to pass <code>image = imageModel</code>, but when I pass the model itself, the controller gets a null value (yes the model name was spelled correctly). When I try to get a property of the model and pass it to the controller (that's the <code>imageLibrary = image.ImageLibrary</code>) the controller receives both the model and the <code>imageLibrary</code> string value! This works fine for the end result, I just don't understand why it works, and I shouldn't have to pass the string value <code>imageLibrary</code> to my controller - especially if I'm not really using it.</p>
  
  <p>Any insight on this would be appreciated.</p>