Click here to Skip to main content
15,920,111 members
Please Sign up or sign in to vote.
4.33/5 (2 votes)
See more:
Hello to all respected expert,

Actually I have create online test for my company.In this we have 2000 questions in database.I have made a program which is taking 100 random questions from database and generate test for user.

Now the problem is could i store the user test client side during the start of the exam.After this if internet disconnect it will not affect user test.He need internet only to submit the test.

Is it possible? If it is then please guide me how to do this. Thank you and forgive me if I am not able to clear my question.
Updated 25-Nov-13 23:53pm
Karthik_Mahalingam 26-Nov-13 6:01am    
for each question have an unique id in the questions table. while submitting the test save the answer with id in the database.

need some info on ur db and business schema..

Yes: save the random questions, and his answers so far, and how far he has got in either a cookie (on his PC) or in a database against his login id (on the server)

Cookies are probably the easiest:
Writing a cookie[^]
Reading a cookie[^]
Share this answer
Better you use collection classes to store questions, like hashtable or arraylist, use collection object to set in session.
Share this answer
its better to save each 3 questions once answered then finally u could save all the questions what the user answered so far..... so provide a page with 3 questions and save button after answering the questions.....
Share this answer

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