.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

problem in navigating from one question to another in online test system in asp.net.

Posted By: Shweta     Posted Date: January 07, 2011    Points:2   Category :ASP.Net
i am creating a online test system displaying one question per page with the four radiobuttons for options.there is the next button to navigate to the next question.
i have used random function for selecting the questions.
the database have five questions with the correct answers.but the problem is that while giving the test out of five one question repeats for two times and the any other question out of those five in the database repeats for three times.
means ultimately i get five questions in the test but out of which two questions get repeated for three and two times each.

Responses
Author: Manas Patnaik             
Posted Date: January 07, 2011     Points: 5   

Can you please share your logic of choosing random questions from Database ?

Manas Patnaik
http://manaspatnaik.com/blog
Author: Sadhuryan             
Posted Date: January 07, 2011     Points: 5   

Hi Shweta,

Its clearly showing the problem, is with your Randomizing function.

Logic should be,

1) Create a temporary question list.
2) Call your randomizing function to pick a question for display.
3) After display, Selected question must be removed from the lot.
4) On clicking 'Next' button, Now again call the function to pick a question from the lot.
Here, the questions will never get repeated.

Is it clear..? good luck.

Revert back to me, in case of queries.



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend