如何在滚动时从Data Base加载数据 [英] How to load data from Data Base while scrolling

查看:75
本文介绍了如何在滚动时从Data Base加载数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有页眉和页脚的页面。在身体区域我有一个div与< asp:DataList>控制。在此控件中,我加载数据。由于我的数据太大,因此需要花费时间同时加载所有数据。我想绑定前25条记录,因为用户向下滚动需要渲染的记录。当我使用$(window).scroll(function()函数时,当用户进入窗口底部时,它会被调用。我需要调用此函数,因为我的主要div得到了十字架。这意味着什么时候说Footer区域如何在ASP.net中实现这个。请帮我提供示例代码。

Hi,

I have a page with header and footers. in body area I have a div with <asp:DataList> control. In this control I load the data. Since my data is too huge it takes time to load all the data at the same time. I want to bind first 25 records,as the user scrolls down the records needs to be rendered. When I use $(window).scroll(function() function it gets called when the user comes down to the bottom of the window. I need to call this function as my main div gets crosses. Which means to say when the Footer area starts. How to implement this in ASP.net. Please help me with the sample code.

推荐答案

(窗口).scroll(函数()函数在调用时调用用户下到窗口的底部。我需要调用此函数,因为我的主要div得到了十字架。这意味着什么时候Footer区域开始。如何在ASP.net中实现这个。请帮我提供示例代码。
(window).scroll(function() function it gets called when the user comes down to the bottom of the window. I need to call this function as my main div gets crosses. Which means to say when the Footer area starts. How to implement this in ASP.net. Please help me with the sample code.


您可以使用jQuery.Check下面提到的链接获取更多信息。



You can do that by using jQuery.Check below mentioned links for more info.


(document).ready(function(){
(document).ready(function () {


这篇关于如何在滚动时从Data Base加载数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆