Adam Howitt blogged recently about Pagination made easier with SQL Server 2005, have a read of his post and take the time to implement the solution as most pagination scripts I’ve seen are lazy and don’t perform well…particularly with a lot of content!