If the cities data doesn't change often, store the cities in some type of List. Each time a user clicks a different letter, such as B or M, goto the db and populate a new list of cities ordered asc for all the M cities. On the first display of the newly clicked M, display the first 10 cities in the list. You know at this point you won't need a previous because it's the first 10 cities. Check to see if an 11th entry exist, and if so, display the next button. On the next button, pass the index of the last city on the screen, such as 10. When the user clicks the next button, the user will be taken to the same page, but now start the index at (10+1) = 11 and show up to 10 more cities. If there are more citeis like 21-30, show the next button, also now if the index you passed, 10 is > than the max number of cities in the list, show the previous button. I hope this helps. Let me know if this is what you are looking for.
We find this kind of rampant individuality very disturbing. But not this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop