Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all
I've tow pages :
1- articles.aspx page that show all headline articles
2- articleDetails.aspx page that show full سpecific artical ( take id from address bar)

now: in articleDetails.aspx page how can i add next and previous links to move to next or previous article?

note: IDs of articles not Sequential ( because admin can delete any article )

please help ...
my regards
Posted

1 solution

Hi,

Even your ID is not sequencial but you can at least check the next article number from the database. you can query on the database like,

SQL
select top 1 * from articles where articleid > currentArticleID order by articleid 

you also need to cosider last article and all other possible scenarios.

hope this may help you.

best luck.
 
Share this answer
 
Comments
ocean99 11-Apr-13 8:27am    
OK , thank you so much
AmitGajjar 11-Apr-13 8:29am    
Your welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900