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. Form Controls

Form Controls

Scheduled Pinned Locked Moved C#
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.
  • D Offline
    D Offline
    deepscyberpulse
    wrote on last edited by
    #1

    Which class does the FindControl method belong to. I need to be able to return which controls lie on a form. E.g. if there is a textbox on the form i should be able to return a messagebox which says that the textbox(textbox_name) exists on the form. Any suggestions please

    C A 2 Replies Last reply
    0
    • D deepscyberpulse

      Which class does the FindControl method belong to. I need to be able to return which controls lie on a form. E.g. if there is a textbox on the form i should be able to return a messagebox which says that the textbox(textbox_name) exists on the form. Any suggestions please

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      There is a Controls collection that you can iterate through. As it does not have a find method, I doubt there's another class offering this facility, but you can iterate through and search yourself. Christian Graus - Microsoft MVP - C++

      1 Reply Last reply
      0
      • D deepscyberpulse

        Which class does the FindControl method belong to. I need to be able to return which controls lie on a form. E.g. if there is a textbox on the form i should be able to return a messagebox which says that the textbox(textbox_name) exists on the form. Any suggestions please

        A Offline
        A Offline
        Ashok Dhamija
        wrote on last edited by
        #3

        There is a FindControl method referred to by you in the System.Web.UI.Control class. However, apparently there is no such method in the System.Windows.Forms.Control class from which the Form class is derived. But, as suggested by Christian Grauss, you can use the Controls property of the Form class alongwith the ControlCollection class member methods to iterate through the controls on a form. Regards, Ashok Dhamija _____________________________ Padam Technologies

        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