Click here to Skip to main content
11,637,415 members (58,953 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET HTML jQuery

i am using ul inside the div tag, i want to load the list on demand,
i mean there is scroll at div tag and inside the div tag there
ul items, i don't want to show all the items, because there is huge records(approx 10,000) that degrade the performance of application if we show all the records.
How to implement the load on demand with list items. i want to implement this like a facebook, when user scroll the content start loading?

Note: First time i want to load the list from server.
Scroll is appearing in div tag not at ul tag.
Posted 13-Dec-12 23:37pm
digimanus at 14-Dec-12 6:01am
no reposting please
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I got understand your expectation.
ok, as per your description you want that there will be a div at the end of like 20 items ok? then after 20 items there will be a div which will contain "see more" button. When any body click the see more button, the next 20 item will show and so on. right..?

ok, first you can make a calculation that how many items you want to show first. you have to maintain a index in database that which cycle data you are fetching. then add see more button with index that which cycle you are selection. when click the see more button then sent the index to database and get the data from database.

in the same way you have to go ahed.

Rashed:: Bangladesh.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The above answer is fairly good. You can also do that when Scrollbar reach to bottom end, just make a Ajax call to the sever to load other items.

There is no meaning of advance, you will need to load the thing automatically when user is interested to see them. You can get user interest by measuring the height of scrollbar.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 295
1 stibee 288
2 270
3 Sergey Alexandrovich Kryukov 224
4 himanshu agarwal 184
0 OriginalGriff 9,031
1 Sergey Alexandrovich Kryukov 8,643
2 Mika Wendelius 6,959
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320

Advertise | Privacy | Mobile
Web01 | 2.8.150728.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100