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. help for enabled property

help for enabled property

Scheduled Pinned Locked Moved C#
sysadminhelptutorial
4 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.
  • V Offline
    V Offline
    vamsimohan21
    wrote on last edited by
    #1

    There are some set of server controls its property enabled= may be true or false,now in code behind how to find its current state and i am getting the controls id during runtime like this foreach(Control c in form1.Controls) { ............ } Thanks In Advance

    Thanks In Advance

    L 1 Reply Last reply
    0
    • V vamsimohan21

      There are some set of server controls its property enabled= may be true or false,now in code behind how to find its current state and i am getting the controls id during runtime like this foreach(Control c in form1.Controls) { ............ } Thanks In Advance

      Thanks In Advance

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

      foreach(Control c in form1.Controls) { if(c.Enabled) MessageBox.Show("this control is enabled"); else MessageBox.Show("this control is not enabled"); }

      V 1 Reply Last reply
      0
      • L Lost User

        foreach(Control c in form1.Controls) { if(c.Enabled) MessageBox.Show("this control is enabled"); else MessageBox.Show("this control is not enabled"); }

        V Offline
        V Offline
        vamsimohan21
        wrote on last edited by
        #3

        but there is no property enabled availble there....

        Thanks In Advance

        V 1 Reply Last reply
        0
        • V vamsimohan21

          but there is no property enabled availble there....

          Thanks In Advance

          V Offline
          V Offline
          vinSharp
          wrote on last edited by
          #4

          What stancrm has written is correct. You can use the 'Enabled' property of System.Windows.Forms.Control

          There are two types of fools in this world: One who give advice and the others who do not take it...

          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