How to Access Parent Page (.aspx) control (IDs) from its child User Control (.ascx or .aspx) ?

  1. #1

    How to Access Parent Page (.aspx) control (IDs) from its child User Control (.ascx or .aspx) ?

    I have in master page a view port, the center region contains a tabpanel where all site pages will be loaded. In the default panel i use <autoload of an aspx page(dashboard)> and in the dashboard i want to create a button to add a new panel in the tabpanel.

    Can you help me!!
  2. #2
    Hi,

    Do you want to achieve it on server side? Then you should be able to create a respective user control property which would contain a parent control.

    You can populate that property on creating of a user control stage.
  3. #3

    From Client Side in javascript

    Quote Originally Posted by Daniil View Post
    Hi,

    Do you want to achieve it on server side? Then you should be able to create a respective user control property which would contain a parent control.

    You can populate that property on creating of a user control stage.


    For those who were looking for a client side answer :

    declare a javascript function and use "parent.YourViewport.getComponent('YourPanel') " this way you will get, for example, your NorthPanel and then be able to collapse it or expand it !

Similar Threads

  1. Replies: 0
    Last Post: Sep 21, 2011, 4:14 PM
  2. Replies: 1
    Last Post: Aug 05, 2011, 12:15 PM
  3. Replies: 7
    Last Post: Apr 14, 2011, 11:52 PM
  4. Replies: 2
    Last Post: Aug 27, 2009, 9:12 AM
  5. AjaxEvent from a child.aspx to a parent.aspx
    By egodoy in forum 1.x Help
    Replies: 2
    Last Post: Mar 23, 2009, 1:52 PM

Posting Permissions