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. radio button

radio button

Scheduled Pinned Locked Moved ASP.NET
6 Posts 6 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
    Member 10231501
    wrote on last edited by
    #1

    count how many times a radio button is selected and ans is shown in a text box

    L B J F D 5 Replies Last reply
    0
    • M Member 10231501

      count how many times a radio button is selected and ans is shown in a text box

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      In the radio button checked event you can set one counter and each time you check that increase the value by 1. store that in temp table(if you want) and display that value in textbox.. Hope this will do the trick..:thumbsup:

      1 Reply Last reply
      0
      • M Member 10231501

        count how many times a radio button is selected and ans is shown in a text box

        B Offline
        B Offline
        Bernhard Hiller
        wrote on last edited by
        #3

        Oh, you have to do some homework? Or is it a suggestion for "Training Questions for Students (beginner level)"?

        1 Reply Last reply
        0
        • M Member 10231501

          count how many times a radio button is selected and ans is shown in a text box

          J Offline
          J Offline
          jitendra kumar upadhyay
          wrote on last edited by
          #4

          you need a counter which increment each time when radio button is checked

          1 Reply Last reply
          0
          • M Member 10231501

            count how many times a radio button is selected and ans is shown in a text box

            F Offline
            F Offline
            Forbiddenx
            wrote on last edited by
            #5

            Make a variable public or private. using public to make it more easy to understand... and place it outside your function so it holds its value after each click. private will also work, but then it is accessible only within the class itself.. that is a whole different discussion. public int counter =0; then in your click event for the radio button increase the counter. counter++; should do the trick... Not going to write it for you though.

            =)

            1 Reply Last reply
            0
            • M Member 10231501

              count how many times a radio button is selected and ans is shown in a text box

              D Offline
              D Offline
              Dholakiya Ankit
              wrote on last edited by
              #6

              you also can do by the javascript here when radio button is clicked start your counter and store it in a cookie and each time clicked increase the counter this will be client side functionality :)

              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