asp.netjavascriptvb.netscrolldatapager

How can i scroll to an anchor?


I have bound a datapager control to a listview.

I would like to scroll to the first item of the listview control on the DataPager click. I think this should be done with javascript. It seems that the datapager does not allow that.

What options do I have? How can I scroll to a specific anchor when clicking on the DataPager?


Solution

  • You can use the javascript function scrollIntoView for that on client side or on "server side": http://www.codeproject.com/KB/aspnet/ViewControl.aspx