title: Paging without postback in mvc4
body: <p>I have to implement paging in MVC4 without postback. I have implemented paging with postback.</p>
  
  <pre><code>public ActionResult Index(int? page)
  {
      var model = from r in db.Country                        
                  orderby r.Description ascending
                  select r;
      int pageSize = 10;
      int pageNumber = (page ?? 1);
      return View(model.ToPagedList(pageNumber, pageSize));           
  }
  </code></pre>
  
  <p>and I have used the below code in view</p>
  
  <pre><code>&lt;div id="pagelist"&gt;
  Page @(Model.PageCount &lt; Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount
  
  @if (Model.HasPreviousPage)
  {
      @Ajax.ActionLink("&lt;&lt;", "Index", new { page = 1 },null)
      @Html.Raw(" ");
      @Ajax.ActionLink("&lt; Prev", "Index", new { page = Model.PageNumber - 1 },null)
  }
  else
  {
      @:&lt;&lt;
      @Html.Raw(" ");
      @:&lt; Prev
  }
  
  @if (Model.HasNextPage)
  {
      @Ajax.ActionLink("Next &gt;", "Index", new { page = Model.PageNumber + 1 },null)
      @Html.Raw(" ");
      @Ajax.ActionLink("&gt;&gt;", "Index", new { page = Model.PageCount },null)
  }
  else
  {
      @:Next &gt;
      @Html.Raw(" ")
      @:&gt;&gt;
  }
  </code></pre>
  
  <p>This code implements paging. But every time when I click on next link, the page refreshes. I want paging without page refresh.</p>