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. Finding list of controls from another aspx page within a project

Finding list of controls from another aspx page within a project

Scheduled Pinned Locked Moved ASP.NET
6 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.
  • S Offline
    S Offline
    Syed Kamran ul Haq
    wrote on last edited by
    #1

    Asalaam Alakum, I am finding list of controls from another aspx page within a project, for this purpose i am tring reflection. If reflection is appropriate solution please give me code else tell me another solution. Thanks alot

    Regards Syed Kamran ul Haq ALLAH HAFIZ

    C 1 Reply Last reply
    0
    • S Syed Kamran ul Haq

      Asalaam Alakum, I am finding list of controls from another aspx page within a project, for this purpose i am tring reflection. If reflection is appropriate solution please give me code else tell me another solution. Thanks alot

      Regards Syed Kamran ul Haq ALLAH HAFIZ

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

      There's not really any way for one page to examine another page, because the only page that exists in your project at runtime is the page currently being generated. What do you need this for ?

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      G 1 Reply Last reply
      0
      • C Christian Graus

        There's not really any way for one page to examine another page, because the only page that exists in your project at runtime is the page currently being generated. What do you need this for ?

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        G Offline
        G Offline
        gspiteri
        wrote on last edited by
        #3

        IF your using user controls it isn't an issue simply expose the user control and the controls on that page you wish to access via public properties

        A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty I am a Optimist

        C 1 Reply Last reply
        0
        • G gspiteri

          IF your using user controls it isn't an issue simply expose the user control and the controls on that page you wish to access via public properties

          A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty I am a Optimist

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

          I would assume if he wants to enumerate controls on a page, he's actually hoping for their state to be maintained, and to get their previous values.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          S 1 Reply Last reply
          0
          • C Christian Graus

            I would assume if he wants to enumerate controls on a page, he's actually hoping for their state to be maintained, and to get their previous values.

            Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            S Offline
            S Offline
            Syed Kamran ul Haq
            wrote on last edited by
            #5

            just like we give form level security to users in our application, i am developing a form which will get the list of controls of a aspx page (page will be selected from ddl) and give rights (visible,enable etc) to them and save in database. thanks for answering.

            Regards Syed Kamran ul Haq ALLAH HAFIZ

            C 1 Reply Last reply
            0
            • S Syed Kamran ul Haq

              just like we give form level security to users in our application, i am developing a form which will get the list of controls of a aspx page (page will be selected from ddl) and give rights (visible,enable etc) to them and save in database. thanks for answering.

              Regards Syed Kamran ul Haq ALLAH HAFIZ

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

              OK, then string mashing is probably your best bet, just look for asp: and an ID attribute to get the type and name of controls.

              Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              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