locked
Online Exam > Suggestions are needed RRS feed

  • Question

  • User1623409651 posted

    Dear All,

    I need few suggestions  

    <script async="" src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

    1. Display number of questions in numeric format what i may use link button or clickable label etc

    2. on click of button i have to display the related question

    3. I used Ajax timer control but it handed while deploy on the server or runs in minus.

    4. while click on previous button we may access the previous question from DB or session ?

    Ideas are needed for above requirements.

    Regards,

    Monday, February 15, 2021 8:18 AM

All replies

  • User571301025 posted

    Hi,

    1. Display number of questions in numeric format what i may use link button or clickable label etc

    Link button is a clear winner on this case. 

    2. on click of button i have to display the related question

    You need to fetch the question from DB and display it. Have you tried any code? If so, paste it here with your problem we are ready to help you.

    3. I used Ajax timer control but it handed while deploy on the server or runs in minus.

    Not sure how you handled your logic on timer. Debugging your code will help on this case. Again, without see your code we can't help you. Post your code will help you better.

    4. while click on previous button we may access the previous question from DB or session ?

    Always fetch it from DB and show. Don't rely on session on your case.

    Hope this helps!

    Monday, February 15, 2021 6:26 PM
  • User1623409651 posted

    Thank you for your reply.

    I have used the Ajax timer control and experience the hanging and ran in minus or stopped during the demo when deployed on hosting server . secondly I have also used the JavaScript timer but on button click page Postback  and it refresh.

    i have to display the question randomly and query each time to db will be more difficult i  think . we cant retrieve the all random question from database and store some where and display the question.

    Please suggest

    Regards,

    Tuesday, February 16, 2021 4:57 AM
  • User-939850651 posted

    Hi Rameezwaheed,

    i have to display the question randomly and query each time to db will be more difficult i  think . we cant retrieve the all random question from database and store some where and display the question.

    I'm not sure how you designed it. Do you want to query the database for new questions when the user clicks the button? Or something else?

    As far as I know, I think all questions should be determined at the beginning (after querying the database) and saved in some place (session, cookie or other).

    The user selects the corresponding question through the button, then whenever the user switches the question, there should be a special identification or parameter (may be the serial number of the question) to compare all the questions that have been stored, and then obtain the specified question content. The question data is fed back to the page, and finally process the data to show it as an exam style.

    I think the main thing you need to deal with is time counting. And according to your design, the implementation will also have this difference, so if you can provide the relevant code, we can better understand your ideas and try to find a solution.

    Best regards,

    Xudong Peng

    Thursday, February 18, 2021 9:56 AM
  • User1623409651 posted

    Thanks for the reply

    I'm not sure how you designed it. Do you want to query the database for new questions when the user clicks the button? Or something else?

    Which one approach will be best either fetching the all random questions once and store it in viewstate or session ? or fetching  the each question from database on  next button click ?

    Regards,

    Thursday, February 18, 2021 12:21 PM
  • User475983607 posted

    Which one approach will be best either fetching the all random questions once and store it in viewstate or session ? or fetching  the each question from database on  next button click ?

    Every web application is stateless.  It is your design decision not the community's to solve the state management approach.  Weigh the options and pick an ASP.NET state management feature that best fits your detailed application requirements.

    I prefer using a database because it is the system of record.  Session and ViewState are volatile by design.  Plus Session and ViewState require more code to sync ASp.NET state with the database.  

    Thursday, February 18, 2021 12:32 PM