run time controls
-
Hi, I'm making online exam system using asp.net, now i'm in the exam page, i read questions, choices, allow multiple choise and right answer, i create controls in run time to carry all the data ( Lable for question, checkboxlist or radiobuttonlist for choices), i create arraylist to put questions right answer in it and another one to put student answers. My problem here is how to store student answers from the selection change for checkboxlist or radiobuttonlist, and how to compare two arraylists to get finall result? Please i want solution for my problems. If anyone have better solution than what i do please tell me. Thanks for help
-
Hi, I'm making online exam system using asp.net, now i'm in the exam page, i read questions, choices, allow multiple choise and right answer, i create controls in run time to carry all the data ( Lable for question, checkboxlist or radiobuttonlist for choices), i create arraylist to put questions right answer in it and another one to put student answers. My problem here is how to store student answers from the selection change for checkboxlist or radiobuttonlist, and how to compare two arraylists to get finall result? Please i want solution for my problems. If anyone have better solution than what i do please tell me. Thanks for help
-
You can use two Hashtable instead of arraylist. And it is good to use question number as key for both hashtables. Then you can easily find answer of each question by the question number.
Gg
-
Thanks for your reply but i still have problem in storing student answers if u have solution please tell me
You are creating controls dynamically. right? If so, you can do a postback using javascript. Use two hidden controls for storing qustion number and selected answer. Set these hidden variables before postbacking the page. Then you will get the values in the codebehind. add this to the selected answers hash table. Then use simple loop to compare both hash tables
Gg
-
You are creating controls dynamically. right? If so, you can do a postback using javascript. Use two hidden controls for storing qustion number and selected answer. Set these hidden variables before postbacking the page. Then you will get the values in the codebehind. add this to the selected answers hash table. Then use simple loop to compare both hash tables
Gg