Click here to Skip to main content
15,887,875 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am developing the Online Exam project in ASP.Net with C#.

but problem is : when use are refresh the page, then exam are restart... but i want when user are give exam at a time user can not allow to refresh the page.

thank you in advance...
Posted
Updated 23-Jul-14 3:20am
v2
Comments
Thanks7872 23-Jul-14 9:20am    
Its not possible as its browser functionality. You can not handle that. Opening exam in window without toolbar can help you,but that also can't be the ultimate solution.
Malli_S 23-Jul-14 9:21am    
Maintaining the user state should be implemented in business logic. Even though user refreshes, your code should be capable enough to handle it.
Thanks7872 23-Jul-14 9:44am    
And that also not possible every time. The only thing you can do is to warn the user of side effects.
ZurdoDev 23-Jul-14 9:58am    
Store the information in the database so it remains persisted.

Store the data in an xml file or database, whatever you are comfortable with. You can re populate the fields on refresh.
Also display a warning saying that what will happen if the user refreshes the page.
Maybe it can be done using javascript but I don't think you should try to overrride the client's browser funtionalities.
 
Share this answer
 
If you are comfortable with JQuery then at background you can send client data to server to maintain state of client in database/session. If client refreshes browser you can resume him from that last state saved in database/session. For webmethod demo you can refer following links
Calling ASP.Net WebMethods using jQuery[^] and
http://aspsnippets.com/Articles/Calling-ASPNet-WebMethod-using-jQuery-AJAX.aspx[^]
 
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