Sorry for the lateness of the reply, but life, liberty, and the pursuit of paper often gets in the way.
My solution is inherently similiar to Thomas' but uses a GridView as I described originally.
Start with a GridView Control. You will need something that acts as a datasource. I used a country list, with name and country code. I created a small utility class to wrap up access to it, with a GetAllCountries and GetCountriesByAbbreviation methods.
Next, I wire up the RowCreated event inorder to create the alpha list in the footer
Private Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated
If e.Row.RowType = DataControlRowType.Footer Then
For AsciiLetter As Integer = 0 To 25
Dim AlphaLinkButton As LinkButton = New LinkButton()
AlphaLinkButton.Text = Char.ConvertFromUtf32(AsciiLetter + 65)
AlphaLinkButton.CommandArgument = Char.ConvertFromUtf32(AsciiLetter + 65)
AlphaLinkButton.CommandName = "AlphabeticalPager"
e.Row.Cells(0).Controls.Add(AlphaLinkButton)
'spacer cheat -- should use CSS instead
Dim spacer As New System.Web.UI.HtmlControls.HtmlGenericControl("span")
spacer.InnerHtml = " "
e.Row.Cells(0).Controls.Add(spacer)
Next
End If
End Sub
This puts the list at the bottom and sets up the links to fire back on the server. So now we need an event to catch those and reset the list.
Private Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
If e.CommandName = "AlphabeticalPager" Then
GridView1.DataSource = CountriesDataSource.GetCountriesByAbbreviation(Convert.ToChar(e.CommandArgument))
GridView1.DataBind()
End If
End Sub
So that's that. The real key is the code Thomas already gave you. The next step is to get it into a GridView or similiar control and handle the server events.
Let me know is this is helpful or you need anything else.
The Universe has no center and I am it.
The superior man is modest in his speech, but exceeds in his actions.