How to navigate Next,Previous ,Last,First
-
Can anybody help me i am developing an online examination system i want to display Questions one by one how i can use move next,move previous,move last,move first
-
Can anybody help me i am developing an online examination system i want to display Questions one by one how i can use move next,move previous,move last,move first
when you design the table, assign a unique number for each question (example: question no.). Say that, you are showing 15th question and the user wants to move to previous. Now you have to show the 14th question. You can do it easily. Use session if you need.
-
Can anybody help me i am developing an online examination system i want to display Questions one by one how i can use move next,move previous,move last,move first
Hi When you select the rows from table sorted by some order let's say sorting by name you can ranking for selected rows and then get the rows where between 1 and 14 This sample query may help you: DECLARE @PageIndex int = 1, DECLARE @PageSize int = 14 SELECT * FROM ( -- selecting the rows sorted by name SELECT Row_NUMBER() OVER (ORDER BY Name DESC) AS Row, Q.* FROM Questions_Table Q ) AS questions WHERE Row BETWEEN CONVERT(nvarchar(10), ((@PageIndex - 1) * @PageSize + 1)) AND CONVERT(nvarchar(10),@PageIndex*@PageSize) Hope that helps
-- http://ashakthi.blogspot.com http://kids-articles.blogspot.com