You have many faults in this model
- fist you use increment and decrement by 1 to get next and previous row and that is wrong bucause you may have id like for example ( 1,2,5,7,10)
-second you retrieve all records from table and put it in dataset you have to get only the record you want to disply for example you create sp with to two parameter first one is current id (int) and
second one is direction (tinyint)1 move first 2 move last 3 move next 4 moveprevious
and inside the sp get right record by current id for example
current id is 5 and direction move next
so your statmant will be
select top 1 * from tablename where idfield>5 order by idfield asc
and if direction is move previous
select top 1 * from tablename where idfield<5 order by idfield desc
and so on
so you encapsulate all logic in the sp and retieve only one row and you dont have to use querystring you can you the value of current id from dispaly form id