This is not that difficult of a task. The first thing I would do on the page is calculate the number of "pages" you have with your data:
Dim RecordsPerPage As Integer = 10
Dim TotalPageCount As Integer = songList.Count \ RecordsPerPage
If songList.Count Mod RecordsPerPage > 0 Then TotalPageCount += 1
You need to keep track of which "page" you are displaying which you could pass through the query string:
Dim CurrentPage As Integer = 1
If Request.QueryString("Page") IsNot Nothing AndAlso Request.QueryString("Page").Trim <> String.Empty Then
CurrentPage = CInt(Request.QueryString("Page"))
End If
Now you know haw many "pages" of data you have and what page you should be displaying (defaults to one if not passed to the page). Now you need to change your For loop to only loop through the items you need to display.
First I would calculate which items we need to display:
Dim StartRecord As Integer = (CurrentPage - 1) * RecordsPerPage
Dim EndRecord As Integer = StartRecord + (RecordsPerPage - 1)
If EndRecord > (songList.Count - 1) Then EndRecord = (songList.Count - 1)
Your beginning of your For loop should then look something like this:
Dim song As XmlNode
For i As Integer = StartRecord To EndRecord
song = songList.Item(i)
........
The rest of the code can stay as it is. Now for navigation you can go as fancy as you would like. You can programatically add links to individual pages of data or previuous and next links. Any link would just need to point to itself passing a page number: Page 2
Let me know if this doesn't make sense. I didn't actually test the code; i just typed it on here. I also assumed with this sample that the XmlNodeList object is zero based.. I've never used it before. Let me know how it goes.
Thanks,
Kenny