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. checking a radio button programmatically

checking a radio button programmatically

Scheduled Pinned Locked Moved ASP.NET
questiondatabase
3 Posts 3 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.
  • M Offline
    M Offline
    mbams
    wrote on last edited by
    #1

    Am currently working on my end of semester project (online examination system )where questions are to be obtained from a database,cached on a dataset and store the dataset in session object(of the global asax file).questions are read from this session variable and displayed on a form on its form load event.this form has 3 buttons that can enable a user to navigate to the next question,previuos question(s) and another to intentionally end the exam.whenever a user clicks on the back button of the form to access a previously answered question,the previous question is shown but the radio button that was checked as the answer is not checked.Any idea on how can i maintain the checked status for the previously answered questions?

    N A 2 Replies Last reply
    0
    • M mbams

      Am currently working on my end of semester project (online examination system )where questions are to be obtained from a database,cached on a dataset and store the dataset in session object(of the global asax file).questions are read from this session variable and displayed on a form on its form load event.this form has 3 buttons that can enable a user to navigate to the next question,previuos question(s) and another to intentionally end the exam.whenever a user clicks on the back button of the form to access a previously answered question,the previous question is shown but the radio button that was checked as the answer is not checked.Any idea on how can i maintain the checked status for the previously answered questions?

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      mbams wrote:

      Any idea on how can i maintain the checked status for the previously answered questions?

      So you don't record and persist the answers they provided to the questions?


      only two letters away from being an asset

      1 Reply Last reply
      0
      • M mbams

        Am currently working on my end of semester project (online examination system )where questions are to be obtained from a database,cached on a dataset and store the dataset in session object(of the global asax file).questions are read from this session variable and displayed on a form on its form load event.this form has 3 buttons that can enable a user to navigate to the next question,previuos question(s) and another to intentionally end the exam.whenever a user clicks on the back button of the form to access a previously answered question,the previous question is shown but the radio button that was checked as the answer is not checked.Any idea on how can i maintain the checked status for the previously answered questions?

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        mbams wrote:

        store the dataset in session object

        First of all, dont do this. Why do you have to set an Entire detaset in session, rather you store in database and get when required.

        mbams wrote:

        whenever a user clicks on the back button of the form to access a previously answered question

        Well, in your case, as I said, always store user's input to the database. Use <a href=nextpage.aspx> to ensure everything to be in the history. If you really require the back functionality you should use <a > tag. Hope you are getting me. :thumbsup:

        Abhishek Sur


        My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

        **Don't forget to click "Good Answer" if you like to.

        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