Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

i'm creating a testing screen in c#, a question is asked and 3 answers is given to choose one and two buttons (next and previous) to get the next question or go back to the previous one.my queston is how to go next and previous in a dataset.
i have to use a dataset and not a reader because i will save the answer choosen by the user for each question.
Thanks
Posted

Hope this[^] might help you.
 
Share this answer
 
Comments
Rojeh 29-Apr-11 8:49am    
10x It may help
//Consider having the following DataSet
DataSet myDS = new DataSet();

//Consider you filled your DataSet from somewhere
string question = myDS.Table["table_name"].Rows[rowNumber].["column_name"]

All you have to do is to add / subrtact from the rowNumber value to get the next / previous question.
 
Share this answer
 
Comments
Rojeh 29-Apr-11 8:49am    
10x it may help me

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