 |
| .NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 3rd, 2007, 01:13 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Online exam Application--Urgent!!!!
Hi all,
I am doing a project -Online exam.
In that first one question should come(with its 4 options) and when i click NEXT Button , 2nd question should come , so on..
and also i want to check each selected answer(Radio Button) with its actual answer.
Please help.
|
|

October 3rd, 2007, 03:44 AM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Logical Help
First you create a database with two tables one each for questions and answers separately. Let both tables have extra flags to determine whether the question is been posted or not [ may be u can set the values as 1 for posted and 0 for non posted question ]..
When you load the page [Let me say a form with 1st question], you display the Question which is not flagged with possible 4 options for radio buttons... When the user selects a particluar answer, check for the answer he has selected with that of the correct ans in database and make the question flag as 1 as its already posted...
When you click next button, reload the page with question whose flag is 0 with its answers...
For each correct answer set a counter and incriment it on each correct answer and finally display the number of correct answers and all the questions with correct answers [ here display those questions with flag set to 1 ]
Best Regards
Sathya
Dreams Unlimited
|
|

October 3rd, 2007, 05:12 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you,
I have created the databases and allr working.
ie.At a time i can acess all questions and option answers in a page.
using datareader.
But i want each question in single page .
and each time i click NEXT a 2nd,3rd, so..on
and i also want to check with the origijal ans to get score.
Quote:
quote:Originally posted by dotnetsathya
Logical Help
First you create a database with two tables one each for questions and answers separately. Let both tables have extra flags to determine whether the question is been posted or not [ may be u can set the values as 1 for posted and 0 for non posted question ]..
When you load the page [Let me say a form with 1st question], you display the Question which is not flagged with possible 4 options for radio buttons... When the user selects a particluar answer, check for the answer he has selected with that of the correct ans in database and make the question flag as 1 as its already posted...
When you click next button, reload the page with question whose flag is 0 with its answers...
For each correct answer set a counter and incriment it on each correct answer and finally display the number of correct answers and all the questions with correct answers [ here display those questions with flag set to 1 ]
Best Regards
Sathya
Dreams Unlimited
|
|
|

October 3rd, 2007, 08:04 AM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Try the following steps.
1. Create 3 Forms, one for Start Page, second for single question on
a page, third form for Displaying all questions and correct
answers.
2. On first form you create a button control 'Start Test', on click
of which you redirect the form to the second page
3. On the second page, you create a readonly text box with four
radio buttons for answers.
4. When the user clicks on the 'Start Test' button on first page,
you are going to load the second page. While doing so, using
execute scalar property, you load the first question [which was
flagged 0 and also may be the top order question] from the DB.
Immediately after the load, you change the flag to 1. For that
question you assign 4 answers from the DB.
5. When you click on next button on the second form, you reload
[redirect to ] same page with the question of next order with
flag 0 and its possible answers.
6. Once a certain number of questions are posed [15 - 20, u can
check with the help of a counter set in the loop of page load ],
you can bring the last page to show, questions and correct
answers and the total score.
I will try to get you the code once I go home and get some time.
and also use similar flag settings.
Best Regards
Sathya
Dreams Unlimited
|
|

December 29th, 2007, 07:30 AM
|
|
Registered User
|
|
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by e.suni
Hi all,
I am doing a project -Online exam.
In that first one question should come(with its 4 options) and when i click NEXT Button , 2nd question should come , so on..
and also i want to check each selected answer(Radio Button) with its actual answer.
Please help.
its better to maintain an XML file
populate the IDs of each question to it.
on each answering catch the option no and uppend it to another node.
try to maintain the xml file at client side
will help you on power failier or system crash to retrieve the data but the user wont get any idea about the values [just some numbers] in the XML file.
finally match the option number selected and the question id with the result table in the Database.
|
|
|

December 29th, 2007, 07:52 AM
|
|
|
Quote:
quote:
try to maintain the xml file at client side
|
Hi,
How will i do this!!!
regds
jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
|
|
 |