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. How can I access child controls of a web form?

How can I access child controls of a web form?

Scheduled Pinned Locked Moved ASP.NET
questionsysadminhelp
7 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.
  • R Offline
    R Offline
    rudy net
    wrote on last edited by
    #1

    I have a web page with a asp:checklistbox object. I have buttons to "check all" checkboxes; however, to avoid the roundtrip back to the server, I was wondering if I could use jscript to set the checkboxes in the client. The problem I have is how do I access all of the checkboxes that get automatically generated by the checklistbox? If I can access all the checklistboxes of the form then I could set their value to checked.

    R 1 Reply Last reply
    0
    • R rudy net

      I have a web page with a asp:checklistbox object. I have buttons to "check all" checkboxes; however, to avoid the roundtrip back to the server, I was wondering if I could use jscript to set the checkboxes in the client. The problem I have is how do I access all of the checkboxes that get automatically generated by the checklistbox? If I can access all the checklistboxes of the form then I could set their value to checked.

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      I believe you may be able to get at them starting with Page.Controls. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

      C 1 Reply Last reply
      0
      • R Ravi Bhavnani

        I believe you may be able to get at them starting with Page.Controls. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        I don't think the OP explained it very well. I think he is talking about using some javascript on the client side.


        My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

        R 1 Reply Last reply
        0
        • C Colin Angus Mackay

          I don't think the OP explained it very well. I think he is talking about using some javascript on the client side.


          My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          Colin Angus Mackay wrote:

          using some javascript on the client side.

          Ah. :-O I guess I'm heavily influenced by code-behind. So nice to dive into ASP.NET and see the resemblance to an MVC paradigm with a distinct separation of presentation and control. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

          R 1 Reply Last reply
          0
          • R Ravi Bhavnani

            Colin Angus Mackay wrote:

            using some javascript on the client side.

            Ah. :-O I guess I'm heavily influenced by code-behind. So nice to dive into ASP.NET and see the resemblance to an MVC paradigm with a distinct separation of presentation and control. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

            R Offline
            R Offline
            rudy net
            wrote on last edited by
            #5

            I am heavily influenced by that as well; however, in this case I would prefer to avoid the trip back to the server.

            R 1 Reply Last reply
            0
            • R rudy net

              I am heavily influenced by that as well; however, in this case I would prefer to avoid the trip back to the server.

              R Offline
              R Offline
              Ravi Bhavnani
              wrote on last edited by
              #6

              Gotcha. Would this[^] link help? /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

              R 1 Reply Last reply
              0
              • R Ravi Bhavnani

                Gotcha. Would this[^] link help? /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

                R Offline
                R Offline
                rudy net
                wrote on last edited by
                #7

                Thanks Ravi, That is a good example when you know the names of the controls. I figured it out as posted in the following link[^] Regards, Rudy

                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