Home All Groups Group Topic Archive Search About

where shoule store the questions and answers

Author
14 Jun 2006 12:39 PM
Sukh
I have to design a "Online Test Application" and application is going
to display question and answers.All the questons are objective type so
there is four answer for each question.
My Question is where I shuld store the questions and answers. and how
application can pick randomly question. right now I have all question
in a text file.

Please give me suggestion. I am using C# and asp.net for this.
Regards,
Sukh.

Author
14 Jun 2006 4:03 PM
Mythran
"Sukh" <sukhsing***@gmail.com> wrote in message
news:1150288744.588971.326950@i40g2000cwc.googlegroups.com...
>I have to design a "Online Test Application" and application is going
> to display question and answers.All the questons are objective type so
> there is four answer for each question.
> My Question is where I shuld store the questions and answers. and how
> application can pick randomly question. right now I have all question
> in a text file.
>
> Please give me suggestion. I am using C# and asp.net for this.
> Regards,
> Sukh.
>

Try SQL Server or SQL Server Express edition dbms :)

Mythran
Author
15 Jun 2006 9:14 AM
Carlos J. Quintero [VB MVP]
You can use the text file, a XML file or a database (Access, SQL Server
Express, etc). If using files, they can be outside the assembly or embedded
inside it.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com


Show quoteHide quote
"Sukh" <sukhsing***@gmail.com> escribió en el mensaje
news:1150288744.588971.326950@i40g2000cwc.googlegroups.com...
>I have to design a "Online Test Application" and application is going
> to display question and answers.All the questons are objective type so
> there is four answer for each question.
> My Question is where I shuld store the questions and answers. and how
> application can pick randomly question. right now I have all question
> in a text file.
>
> Please give me suggestion. I am using C# and asp.net for this.
> Regards,
> Sukh.
>
Author
15 Jun 2006 9:31 AM
Andrew Morton
Sukh wrote:
> I have to design a "Online Test Application" and application is going
> to display question and answers.All the questons are objective type so
> there is four answer for each question.
> My Question is where I shuld store the questions and answers. and how
> application can pick randomly question. right now I have all question
> in a text file.

You could have your text file formatted like
question1<tab>correct answer<tab>wrong answer 1<tab>wrong answer
2<tab>wrong answer 3
question2<tab>correct answer<tab>wrong answer 1<tab>wrong answer
2<tab>wrong answer 3
question3<tab>correct answer<tab>wrong answer 1<tab>wrong answer
2<tab>wrong answer 3

then read in each line into an ArrayList and store it in a session
variable.

To present a question, choose a random integer between 0 and your
arraylist.length-1, and separate out the parts with String.Split.
Present the potential answers in a random order. Delete the entry in the
ArrayList so it doesn't get asked again. Store the modified ArrayList
back in the session variable.

(Some people might advocate using XML for the file format.)

> Please give me suggestion. I am using C# and asp.net for this.

You might want to post in a C# newsgroup instead.

Andrew