title: Jquery paging scroll in Asp.net MVC
body: <p>I tried to search  2 days about how to do the paging scroll in asp.net mvc project. But I just found the result that not fit to mind.</p>
  
  <p>I am using asp.net mvc 2, and I retrieve all the data from my controller by JSON, and I take the JSON result to display in my view of my mvc project. As the result, there are many products that I display in my views (I put the products in the table). So I want to do a paging scroll to automatically load new content at the bottom of the screen when the user scrolls beyond the element, much like Facebook does with their status updates. </p>
  
  <p>This is some codes show how I display the JSON in my partial views :</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
   $(document).ready(function () {
     var url = '&lt;%: Url.Content("~/") %&gt;' + "ProductListing/AllProductListing";
     var $parent = $("#productlist").empty();
  
     $parent.append('&lt;br/&gt;&lt;table id="myTable" cellpadding="0" cellspacing="0" width="100%" class="productlist" style="margin-left:4px; padding-top:2px;"&gt;&lt;tbody&gt;');
  
     var loading = $.getJSON(url,function (product) {
     if(product.ja.length == 0){
       $('#loading').hide();
       $("#productlist").html("&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;There is no product in this category.&lt;/b&gt;");
     }
     while (k &lt; loopK) {
       var count_item = 0;
       $.each(product.ja, function (index, value) {
        //blah blah blah ....
  
       });
      }
    });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>This block of code is working well.</p>
  
  <p>Any idea or sample please.</p>
  
  <p>Thanks.</p>