Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET HTML jQuery
Hi,

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 14-Dec-12 0:37am
amit_83996
Comments
digimanus at 14-Dec-12 6:01am
   
no reposting please
Rate this: bad
good
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.
 

thanks.
Rashed:: Bangladesh.
  Permalink  
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 BillWoodruff 220
4 Mathew Soji 195
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,817
2 DamithSL 5,461
3 Manas Bhardwaj 4,946
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2014
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