Click event doesn't fire o dynamicly added user controls

Discussion in 'ASP .Net' started by Henke, Jun 29, 2004.

  1. Henke

    Henke Guest

    Hi
    I have a aspx-page with a panel-control. On this panel control I add user
    controls dynamicly with LoadControl and panel.Controls.Add(myControl).

    On some of the dynamicly added user controls I have button's and handlers
    for the click event.

    Why doesn't the event get fired in the dynamicly added control?

    Thanks!

    /Henke
     
    Henke, Jun 29, 2004
    #1
    1. Advertising

  2. Henke

    Guest

    On Tue, 29 Jun 2004 16:30:28 +0200, "Henke" <>
    wrote:

    >Hi
    >I have a aspx-page with a panel-control. On this panel control I add user
    >controls dynamicly with LoadControl and panel.Controls.Add(myControl).
    >
    >On some of the dynamicly added user controls I have button's and handlers
    >for the click event.
    >
    >Why doesn't the event get fired in the dynamicly added control?
    >
    >Thanks!
    >
    >/Henke
    >


    the dynamic controls have to be readded to the form and the event
    handlers have to be recreated each time the page comes back.

    -Adam
     
    , Jun 29, 2004
    #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. Henke
    Replies:
    5
    Views:
    680
    Munsifali Rashid
    Dec 30, 2003
  2. Bennett Haselton
    Replies:
    1
    Views:
    543
    John M Deal
    Nov 8, 2004
  3. Anders K. Jacobsen [DK]

    Viewstate and dynamicly added controls

    Anders K. Jacobsen [DK], Mar 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    439
    Karl Seguin
    Mar 22, 2005
  4. niberhate
    Replies:
    1
    Views:
    1,379
    Cubaman
    Apr 26, 2010
  5. Mike Housey

    Persistance of Dynamicly added user controls.

    Mike Housey, Aug 5, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    136
    Ken Cox [Microsoft MVP]
    Aug 8, 2003
Loading...

Share This Page