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. General Programming
  3. C#
  4. how to do validation of radiobuttons

how to do validation of radiobuttons

Scheduled Pinned Locked Moved C#
helptutorial
5 Posts 4 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.
  • S Offline
    S Offline
    srinivassam
    wrote on last edited by
    #1

    in my application i have one table control in that i took 5 radiobutton, my problem is no one select atleast one radio button then he won't go next page.how can validate these radiobuttons srinivas

    T M 2 Replies Last reply
    0
    • S srinivassam

      in my application i have one table control in that i took 5 radiobutton, my problem is no one select atleast one radio button then he won't go next page.how can validate these radiobuttons srinivas

      T Offline
      T Offline
      Tamimi Code
      wrote on last edited by
      #2

      you can set a default one

      When you get mad...THINK twice that the only advice Tamimi - Code

      1 Reply Last reply
      0
      • S srinivassam

        in my application i have one table control in that i took 5 radiobutton, my problem is no one select atleast one radio button then he won't go next page.how can validate these radiobuttons srinivas

        M Offline
        M Offline
        Muhammad Gouda
        wrote on last edited by
        #3

        if(!(rdioBtn1.Checked || rdioBtn2.Checked || rdioBtn3.Checked || rdioBtn4.Checked || rdioBtn5.Checked )) { MessageBox.Show("Please, select one."); //Here stop the action of going to next page }

        Mohamed Gouda Egypt

        R S 2 Replies Last reply
        0
        • M Muhammad Gouda

          if(!(rdioBtn1.Checked || rdioBtn2.Checked || rdioBtn3.Checked || rdioBtn4.Checked || rdioBtn5.Checked )) { MessageBox.Show("Please, select one."); //Here stop the action of going to next page }

          Mohamed Gouda Egypt

          R Offline
          R Offline
          Ravindra Nidhonkar
          wrote on last edited by
          #4

          You can use Required field validator control... Enjoy coding....

          1 Reply Last reply
          0
          • M Muhammad Gouda

            if(!(rdioBtn1.Checked || rdioBtn2.Checked || rdioBtn3.Checked || rdioBtn4.Checked || rdioBtn5.Checked )) { MessageBox.Show("Please, select one."); //Here stop the action of going to next page }

            Mohamed Gouda Egypt

            S Offline
            S Offline
            srinivassam
            wrote on last edited by
            #5

            Hi Mohamed Gouda garu , THANKYOU VERYMUCH your code is very useful to me THANKYOU VERYMUCH Regards, srinivas srinivas

            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