title: Nuget MVC PagedList Page Links not working correctly
body: <p>I have a simple ViewModel that I want to display as a list page. I followed <a href="http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application" rel="nofollow">this</a> tutorial for paging my list page. Heere is my controller code that returns a view with IPagedList</p>
  
  <pre><code>public ViewResult Index(int? page)
  {
      List&lt;ProjectViewModel&gt; projectList = new List&lt;ProjectViewModel&gt;();
      foreach (Project project in db.Projects)
      {
          projectList.Add(ProjectViewModel.ConvertToProjectViewModel(project));
      }
      var pageNumber = page ?? 1;
      return View(projectList.ToPagedList(pageNumber, 3));
  }
  </code></pre>
  
  <p>Below is my view, that renders correctly with the pager rendering as well:</p>
  
  <pre><code>@using PagedList.Mvc;
  @using PagedList;
  @model PagedList.IPagedList&lt;LayoutTest.ViewModels.ProjectViewModel&gt;
  
  &lt;link href="/Content/PagedList.css" rel="stylesheet" type="text/css" /&gt;
  
  &lt;script&gt;
  $(function() {
    $("div.progressbar2").progressbar({ value: 92 });
    $("div.progressbar").each(function () {
        var element = this;
        $(element).progressbar({
            value: parseInt($(element).attr("data-last-value")),
        });
    });
  });
  &lt;/script&gt;
  @foreach (var item in Model)
  {
     &lt;div class="list-container"&gt;
      &lt;div class="list-image"&gt;
          &lt;img src="@item.ProjectLogo" width="300" height="225"/&gt;
      &lt;/div&gt;
      &lt;div class="list-title"&gt;
          @Html.DisplayFor(modelItem =&gt; item.Title)
      &lt;/div&gt;
      &lt;div class="list-min-container"&gt;
          &lt;div class="list-min-left"&gt;
              Owner: TBD
          &lt;/div&gt;
          &lt;div class="list-min-right"&gt;
              Cost: $@Html.DisplayFor(modelItem =&gt; item.EstimatedCost)
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="list-brief"&gt;
          @Html.DisplayFor(modelItem =&gt; item.Brief)
      &lt;/div&gt;
      &lt;div class="list-min-container"&gt;
          &lt;div class="list-min-left"&gt;
                          Location - TBD
          &lt;/div&gt;
          &lt;div class="list-min-right"&gt;
              @Html.DisplayFor(modelItem =&gt; item.EndDate)
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="progressbar" data-last-value="@item.StartDate.Date.Month"&gt;
          &lt;div class="progress-label"&gt;@item.StartDate.Date.Month % complete&lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
  }
  
  @Html.PagedListPager( (IPagedList)Model, page =&gt; Url.Action("Index", new { page }) )
  </code></pre>
  
  <p>However when I click on the pager to navigate to another page nothing happens, no error message or anything. Has anybody faced something similar?</p>
  
  <p>EDIT :</p>
  
  <p>Following is the html output from the PagedListPager:</p>
  
  <pre><code> &lt;div class="pagination PagedList-pager"&gt;
   &lt;ul&gt;&lt;li class="previous disabled PagedList-skipToPrevious"&gt;&lt;a&gt;&amp;larr; Previous&lt;/a&gt;&lt;/li&gt;
       &lt;li class="active"&gt;&lt;a&gt;1&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="/Project?Page=1"&gt;2&lt;/a&gt;&lt;/li&gt;
       &lt;li class="next PagedList-skipToNext"&gt;&lt;a href="/Project?Page=1"&gt;Next &amp;rarr;&lt;/a&gt;&lt;/li&gt;
   &lt;/ul&gt;&lt;/div&gt;
  </code></pre>