views:

28

answers:

3

I have noticed that in Google web reader (that lets us read RSS feeds on the web), the page does not seem to load ALL the feeds. Instead, as I scroll down, I can see more and more feeds (and the size of the scrollbar increases if you know what i mean)

I assume they do this by finding the position of the scrollbar and do an AJAX call. Is this correct? How would I do this in ASP.NET?

A: 

The ASP.NET side of things is no different from any other HTTP response — you just provide the requested data.

The trick here is to check how far the browser has scrolled and make the request if it has scrolled however far you determine is far enough. You can use the scroll event.

David Dorward
A: 

I don't think it's enough to simply look at scroll events. You should check to see if the last item in your last has become visible in the viewport (visible browser window), then call __doPostBack('GetMoreItems'). It involves digging into some of the more obnoxious parts of javascript (offsets), but this question should help point you in the right direction.

Josh Wolf
Hence "if it has scrolled however far you determine is far enough"
David Dorward
A: 

Rob Conery has a blog post on something similar here

Pharabus