Dynamic controls and their values..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tascien

    Dynamic controls and their values..

    I have a user control that has dynamic controls loaded to it in
    Page_Init.

    this works well. I have a function inside the user control:

    GetValues()

    When i add this usercontrol to a page: test.aspx and i call
    GetValues(), it returns me the values of the dynamically added controls
    correctly.

    But when add this usercontrol to another user control: userc.ascx, and
    add userc.ascx to test.aspx, and i call GetValues(), the values
    returned are only from the before previous requests. it is like the
    values are not assigned to the dynamic controls until the page has
    finished loading.

    Is there anything i can add to my getValues() function to tell the
    control to assign posted values before returning to me?

    help appreciated.

    T.

  • tascien

    #2
    Re: Dynamic controls and their values..

    I will reply to my post:

    - Well, userc.ascx was being loaded from Page_Load()

    usr = LoadControl("us erc.ascx")
    me.controls.add (usr)

    that cause problems... I moved the above code into Page_Init()

    Thanks.

    Comment

    Working...