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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. how to find page controls

how to find page controls

Scheduled Pinned Locked Moved C#
tutorialquestion
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.
  • F Offline
    F Offline
    Farhan Ali
    wrote on last edited by
    #1

    Hi: i am creating controls on a webpage dynamically and then want to get all page controls using "page.controls.count" but it is not getting page controls anybody have any idea?? thanx

    C S M 3 Replies Last reply
    0
    • F Farhan Ali

      Hi: i am creating controls on a webpage dynamically and then want to get all page controls using "page.controls.count" but it is not getting page controls anybody have any idea?? thanx

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

      When you created your dynamic controls, did you add the controls to the Page.Controls collection?


      Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

      F 1 Reply Last reply
      0
      • C Colin Angus Mackay

        When you created your dynamic controls, did you add the controls to the Page.Controls collection?


        Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

        F Offline
        F Offline
        Farhan Ali
        wrote on last edited by
        #3

        thanx for ur reply yes i added it to the page controls.

        1 Reply Last reply
        0
        • F Farhan Ali

          Hi: i am creating controls on a webpage dynamically and then want to get all page controls using "page.controls.count" but it is not getting page controls anybody have any idea?? thanx

          S Offline
          S Offline
          Sandeep Akhare
          wrote on last edited by
          #4

          Might be the controls are not getting added to the page Where are you adding the controls to the page ? First check by debugging the application

          Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

          1 Reply Last reply
          0
          • F Farhan Ali

            Hi: i am creating controls on a webpage dynamically and then want to get all page controls using "page.controls.count" but it is not getting page controls anybody have any idea?? thanx

            M Offline
            M Offline
            Malcolm Smart
            wrote on last edited by
            #5

            Are you counting the controls on postback? On a postback, you have to create and add all the controls again.

            "More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF

            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