2013-12-17 38 views
0

在ASP.Net與vb.net開發的網站中,我希望將所有10000條記錄顯示在單個頁面中,但是要將來自具有無限滾動選項的數據庫(如Facebook,Twitter)。我正在使用Datagrid控件,並從Oracle檢索數據。如何在ASP.Net中實現無限滾動DataGrid控件

當用戶滾動到窗口的底部時,它會加載更多的記錄,就像Twitter提要頁面那樣。

什麼是創建無限滾動的最佳方法。幫我

回答

1

退房jQuery Endless Scroll plug-in

標記:

$(document).ready(function() { 
    $('#container').endlessScroll({ 
     inflowPixels: 100, // start scroll 100 pixels from bottom of DIV 
     fireDelay: 2000, // delay in milliseconds 
     callback: function (p) { 
      // AJAX call to server to fetch more 50, 100 or 
      // whatever amount more of data 

     } 
    }); 
}); 

<div id="container"></div> 

代碼隱藏:

Sub Page_Load(sender As Object, e As EventArgs) 
    ' Put logic here to load initial 50, 100 or whatever initial amount of rows 

End Sub 
相關問題