Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. run time controls

run time controls

Scheduled Pinned Locked Moved ASP.NET
helpquestioncsharpasp-nettutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rmedo
    wrote on last edited by
    #1

    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

    G 1 Reply Last reply
    0
    • R rmedo

      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

      G Offline
      G Offline
      GgAben
      wrote on last edited by
      #2

      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

      R 1 Reply Last reply
      0
      • G GgAben

        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

        R Offline
        R Offline
        rmedo
        wrote on last edited by
        #3

        Thanks for your reply but i still have problem in storing student answers if u have solution please tell me

        G 1 Reply Last reply
        0
        • R rmedo

          Thanks for your reply but i still have problem in storing student answers if u have solution please tell me

          G Offline
          G Offline
          GgAben
          wrote on last edited by
          #4

          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

          R 1 Reply Last reply
          0
          • G GgAben

            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

            R Offline
            R Offline
            rmedo
            wrote on last edited by
            #5

            Thanks for your help

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups