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. Access Parent Page Members From The User Control.

Access Parent Page Members From The User Control.

Scheduled Pinned Locked Moved ASP.NET
helpquestion
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.
  • A Offline
    A Offline
    aakar
    wrote on last edited by
    #1

    Hi, I need to access the members (controls,properties,methods) in the Parent Page from the User Control which is contained in it. For the controls I tried looping through the controls in the Parent Page but I am not able to find the textboxes as they are rendered as a literal control. Also how do I access the properties and methods of the Parent Page from the User Control. Please help me out. Thanks in advance, Aakar.

    H S 2 Replies Last reply
    0
    • A aakar

      Hi, I need to access the members (controls,properties,methods) in the Parent Page from the User Control which is contained in it. For the controls I tried looping through the controls in the Parent Page but I am not able to find the textboxes as they are rendered as a literal control. Also how do I access the properties and methods of the Parent Page from the User Control. Please help me out. Thanks in advance, Aakar.

      H Offline
      H Offline
      Hesham Amin
      wrote on last edited by
      #2

      This does not seem like a good design for your application. What does this control do and why should it see all page members? Can you just cast the Page property of the control to the container page type (if this control is always used in the same page).


      Hesham A. Amin My blog

      1 Reply Last reply
      0
      • A aakar

        Hi, I need to access the members (controls,properties,methods) in the Parent Page from the User Control which is contained in it. For the controls I tried looping through the controls in the Parent Page but I am not able to find the textboxes as they are rendered as a literal control. Also how do I access the properties and methods of the Parent Page from the User Control. Please help me out. Thanks in advance, Aakar.

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

        you can access parent control but this is not proper way instead you can create properties in user control those required

        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
        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