locked
How to open a particular exam by clicking the Gridview row,with Timer of total duration? RRS feed

  • Question

  • User-521826128 posted

    Hello, I want to click a gridview row , in that  available exams,like c#, java, etc and the online exam should begin with timer, how to do that ? Test will begin in the next page  with timing in the right. Hope you understood the requirement.  Notification of 5 minutes should also be there. Thanks 

    Saturday, February 25, 2017 10:32 AM

Answers

  • User-1838255255 posted

    Hi Shuklaji123,

    According to your description, as far as I know, you could add button click then redirect to the related page.

    when you open this page, you could populate the data from database in Page_Load Event.  

    About the Timer, you could use Timer control or JS.

    Here is the complete code of this project, please check:

    Sample Online Exam:

    http://www.dotnetfunda.com/articles/show/2183/sample-online-exam 

    Best Regards,

    Eric Du

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 27, 2017 8:11 AM
  • User-1838255255 posted

    Hi Shuklaji123,

    According to your description, as far as I know, you could add check this line code, when this.Hours(current) equal to 0, and this.Minutes(current) equal to 5, and this.Seconds(current) equal to 0, trigger Popup, show left 5 minutes.

    this.OutputCntrl.innerHTML = this.Hours(current) + ':' + this.Minutes(current) + ':' +  this.Seconds(current);
    

    Here is a tutorial about how to use jQuery Popup:

    https://jqueryui.com/dialog/ 

    Best Regards,

    Eric Du

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 28, 2017 9:10 AM

All replies

  • User-1509636757 posted

    I understand that would be some fix time (30 minutes or 50 minutes or so) to complete one exam. Considering that, once any user click and start an exam, then you can store that start time and end time (by adding exam time 30/50 minutes in start time) in a database table. This way, every time when page refreshes you can pole to this database table for this record to show a timer for showing remaining time. Hope that make sense in your code scenario.

    Saturday, February 25, 2017 6:46 PM
  • User-521826128 posted

    thanks a lot but how to implement that in my current online exam portal...

    Sunday, February 26, 2017 8:55 AM
  • User-1838255255 posted

    Hi Shuklaji123,

    According to your description, as far as I know, you could add button click then redirect to the related page.

    when you open this page, you could populate the data from database in Page_Load Event.  

    About the Timer, you could use Timer control or JS.

    Here is the complete code of this project, please check:

    Sample Online Exam:

    http://www.dotnetfunda.com/articles/show/2183/sample-online-exam 

    Best Regards,

    Eric Du

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 27, 2017 8:11 AM
  • User-521826128 posted

    thanks a lot...., but I also want to notify the student that 5 minutes is left in a popup ... How to do that ?

    Monday, February 27, 2017 10:27 AM
  • User-1838255255 posted

    Hi Shuklaji123,

    According to your description, as far as I know, you could add check this line code, when this.Hours(current) equal to 0, and this.Minutes(current) equal to 5, and this.Seconds(current) equal to 0, trigger Popup, show left 5 minutes.

    this.OutputCntrl.innerHTML = this.Hours(current) + ':' + this.Minutes(current) + ':' +  this.Seconds(current);
    

    Here is a tutorial about how to use jQuery Popup:

    https://jqueryui.com/dialog/ 

    Best Regards,

    Eric Du

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 28, 2017 9:10 AM
  • User-521826128 posted

    thanks, will implement it, in my project and let u know.... Thanks a lot.......

    Wednesday, March 1, 2017 5:11 AM