Click here to Skip to main content
15,903,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello , i m working on a online exam project without database. all the question are written on page in label control while all answer are in radio button now problem is when a student answer all the question and go to the next page. and suddenly back to the previous page anll the radiobutton show unchecked and he/she don't know that what answer he/she given on that page , so can anybody help me to keep maintain all the value of previous page its very urgent
Posted

You have two options: Cookies[^] (stored on the client computer, so preserved for next time he accessed the exam) or Session[^] (Stored on the server, so cleared automatically after a short time, or when the client browser closes)
 
Share this answer
 
Comments
Member 10273293 1-Apr-14 5:58am    
can you please explain me with code according to my requirement i am very thankfully to you if you do so . i have three page each page have ten question,each question written in a label control and for answer radio button when a student answer all the question and go to the next page. and suddenly back to the previous page anll the radiobutton show unchecked and he/she don't know that what answer he/she given on that page
OriginalGriff 1-Apr-14 6:04am    
So decide which to use (Cookies / Session - the priority is up to you) and follow the appropriate link: they both show examples of how to use them.
Check this article which uses internally session.

Maintaining State Per Page in ASP.NET Web Applications[^]
 
Share this answer
 
Comments
Member 10273293 1-Apr-14 5:58am    
can you please explain me with code according to my requirement i am very thankfully to you if you do so . i have three page each page have ten question,each question written in a label control and for answer radio button when a student answer all the question and go to the next page. and suddenly back to the previous page anll the radiobutton show unchecked and he/she don't know that what answer he/she given on that page
ArunRajendra 1-Apr-14 6:14am    
The article gives how you can save the data and retrieve back when you navigate between pages. The logic is store the values in session say for ex: session[page1_q1] = values and set back the radio button or check box depending about the choice. If the user is there for first time then the session will be blank and hence the none of the option will be selected.

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