title: WebGrid Helper pagination not working with .NET 4.5 MVC 4
body: <p>I have upgraded an mvc3 project to mvc4 project and I have changed the target framework from .NET 4.0 to .NET 4.5 (I don't know if it's important to say).</p>
  
  <p>Now, everywhere I use a webgrid helper, pagination is completely broken.
  Indeed, update request is sent 4 times and the element with "displayClient" as Id is totally removed from html document.</p>
  
  <p>This is few lines of my source code:</p>
  
  <pre><code>@{
      var grid = new WebGrid(canPage: true, canSort: true, ajaxUpdateCallback: "UpdateWebGridClient", ajaxUpdateContainerId: "displayClient", rowsPerPage: Model.RowPerPageClientId);
      grid.Bind(Model.ClientList, rowCount: Model.ClientNumber, autoSortAndPage: false);
      @grid.GetHtml(
          htmlAttributes: new { id = "grid", @class = "clientTable" },
          rowStyle: "odd",
          alternatingRowStyle: "even",
          footerStyle: "footerWebGrid",
          mode: WebGridPagerModes.All,
          numericLinksCount: 10,
          columns: grid.Columns(
              grid.Column("Id", SUResources.Admin.ClientRef, style: "ref"),
              grid.Column("FullName", SUResources.Admin.ClientFullName, style: "name"),
              grid.Column("Town", SUResources.Admin.ClientTown, style: "town"),
              grid.Column("Country", SUResources.Admin.ClientCountry, style: "country"),
              grid.Column("Email", SUResources.Admin.ClientEmail, style: "email"),
              grid.Column("PurchasedPicture", SUResources.Admin.ClientPurchasedPicture, style: "purchasedPicture"),
              grid.Column("Ca", SUResources.Admin.ClientRevenue, style: "ca"),
              grid.Column(
                  style: "first-icon icons",
                  format: (item) =&gt; Ajax.ActionLink(
                      " ",
                      "ClientInformation",
                      new { clientId = item.Id },
                      new AjaxOptions
                      {
                          HttpMethod = "Get",
                          UpdateTargetId = "showClientInformation",
                          InsertionMode = InsertionMode.Replace
                      },
                      new
                      {
                          @class = "record"
                      }
                  )
              ),
              grid.Column(
                  style: "icons",
                  format:
                  @&lt;text&gt;
                      @Html.ActionLink(" ", "Index", "SendMail", new { CustomerId = item.Id }, new { @class = "green-mail" })
                  &lt;/text&gt;
              ),
              grid.Column(
                  style: "icons",
                  format:
                  @&lt;text&gt;
                      @if (item.StatusId == (short)Shootus.Domain.EnumTypes.CustomerState.Active)
                      {
                          &lt;a onclick="ChangeCustomerStatus(this);" data-customer-id="@item.Id"&gt; &lt;img alt="" title="@SUResources.Admin.ClientEditionActiveUser" src="/Areas/Admin/Content/Images/Icons/ico-client-active-account.png"/&gt;&lt;/a&gt;
                      }
                      else
                      {
                      string CustomerCurrentStatus = SUResources.Admin.ClientEditionBannedUser;
  
                      CustomerCurrentStatus = (item.StatusId == (short)Shootus.Domain.EnumTypes.CustomerState.NotValidated) ? SUResources.Admin.ClientEditionEmailNotValidatedUser : CustomerCurrentStatus;
                      CustomerCurrentStatus = (item.StatusId == (short)Shootus.Domain.EnumTypes.CustomerState.TurnedOff) ? SUResources.Admin.ClientEditionUnactiveUser : CustomerCurrentStatus;
                      &lt;a onclick="ChangeCustomerStatus(this);" data-photographer-id="@item.Id"&gt; &lt;img alt="" title="@CustomerCurrentStatus" src="/Areas/Admin/Content/Images/Icons/ico-client-inactive-account.png"/&gt;&lt;/a&gt;
                      }
                  &lt;/text&gt;
              ),
              grid.Column(
                  style: "icons",
                  format: @&lt;text&gt;
                      @Html.ActionLink(" ", "Delete", new { Id = item.Id }, new { @class = "delete" })
                  &lt;/text&gt;
              )
          )
      );
  }
  &lt;div class="dot-line"&gt;
  &lt;/div&gt;
  &lt;div class="pager client-line-pager"&gt;
      @grid.Pager()
  &lt;/div&gt;
  </code></pre>
  
  <p>Default pager in the webgrid is hidden with css property display.</p>
  
  <p>I saw in the generated html that there is some new attributes like data-swhgajax, data-swhgcallback on the table and on the generated code for the pager: data-swhgcontainer, data-swhglnk,...</p>
  
  <p>I use jQuery.ajaxPrefilter for handling some extra data from an external form in the page.</p>
  
  <p>Is there someone have the same problem and did he have solved it ? Ideas about the origin of this problem ?</p>
  
  <p>Thank you for taking the time to read this post and I hope somebody can help me :-(</p>