Getting values entered into (dynamicly loaded control)

Discussion in 'ASP .Net Web Controls' started by Micha³ Januszczyk, Mar 9, 2005.

  1. I've dynamicly loaded user control (.ascx file) into my page via
    Page.LoadControl() method. The control has been added to Controls collection
    of some TableCell (named dynamicCtlPlaceholder). The control appears in the
    desired location. The control allows to enter two strings: name and surname.

    I would like to get data, that user entered into the control (two textboxes
    inside the control) upon postback. how can I get it ?
    When I iterate through the dynamicCtlPlaceholder's Controls property, there
    is no my control. The runtime has not recreated it upon postback.

    How can I get the values ?

    Thanks for help
    Michal Januszczyk
     
    Micha³ Januszczyk, Mar 9, 2005
    #1
    1. Advertising

  2. Micha³ Januszczyk

    Guest

    That is because you are responsible for recreating the control each
    time. You are also responsible for making sure that it is given the
    same name each time. If you do the following in a timely manner then
    the viewstate should be loaded and the values should be available
     
    , Mar 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TN Bella
    Replies:
    1
    Views:
    1,558
    TN Bella
    Jul 1, 2004
  2. =?Utf-8?B?dmluZWV0YmF0dGE=?=

    How to access values entered in User control in the main page.

    =?Utf-8?B?dmluZWV0YmF0dGE=?=, Nov 6, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    556
  3. Nathan Sokalski
    Replies:
    2
    Views:
    1,709
    Nathan Sokalski
    Jul 21, 2006
  4. MikeM

    Dynamicly loaded User Control events in a Placeholder

    MikeM, Apr 9, 2004, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    225
    Jonathan Roberts
    Apr 25, 2004
  5. Micha³ Januszczyk

    Getting values entered into (dynamicly loaded control)

    Micha³ Januszczyk, Mar 9, 2005, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    140
    Mantas Miliukas
    Mar 10, 2005
Loading...

Share This Page