Control added programmatically not firing event

Discussion in 'ASP .Net Building Controls' started by Troy, Feb 29, 2004.

  1. Troy

    Troy Guest

    Hi, I'm loading a usercontrol with image buttons into a panel. When clicking the buttons the click event does not fire. Any suggestions

    Thanks
    Tro
     
    Troy, Feb 29, 2004
    #1
    1. Advertising

  2. Provide some more details. At what stage of your pages life cycle are you
    loading the controls. In what method. Are you loading the controls based on
    a button click ?


    "Troy" <> wrote in message
    news:...
    > Hi, I'm loading a usercontrol with image buttons into a panel. When

    clicking the buttons the click event does not fire. Any suggestions?
    >
    > Thanks,
    > Troy
    >
     
    Alessandro Zifiglio, Mar 1, 2004
    #2
    1. Advertising

  3. Troy

    Troy Guest

    Alessandro
    I was loading the UserControl into a panel based on a button click. Unfortunately, this didn't work. The UserControl never showed up. The UserControl is determined by a database record and associated fields with content for that control on button click. It seems to get this to work, I have to load the sub Get_UserControl, which provides the function described earlier, during the Page_Load event of the base page. When I do this, my button click event fires. But this is wrought with all kinds of problematic behavior, having to load Get_UserControl twice, once during the Page_Load event of the base page, and again within my UserControl dynamically loaded in the panel. Any thoughts

    Troy

    ----- Alessandro Zifiglio wrote: ----

    Provide some more details. At what stage of your pages life cycle are yo
    loading the controls. In what method. Are you loading the controls based o
    a button click


    "Troy" <> wrote in messag
    news:..
    > Hi, I'm loading a usercontrol with image buttons into a panel. Whe

    clicking the buttons the click event does not fire. Any suggestions
    >> Thanks

    > Tro
    >
     
    Troy, Mar 1, 2004
    #3
  4. see if this old post helps resolve your issue

    http://groups.google.com/groups?hl=...re&ie=UTF-8&oe=UTF-8&hl=en&btnG=Google+Search

    "Troy" <> wrote in message
    news:...
    > Alessandro,
    > I was loading the UserControl into a panel based on a button click.

    Unfortunately, this didn't work. The UserControl never showed up. The
    UserControl is determined by a database record and associated fields with
    content for that control on button click. It seems to get this to work, I
    have to load the sub Get_UserControl, which provides the function described
    earlier, during the Page_Load event of the base page. When I do this, my
    button click event fires. But this is wrought with all kinds of problematic
    behavior, having to load Get_UserControl twice, once during the Page_Load
    event of the base page, and again within my UserControl dynamically loaded
    in the panel. Any thoughts?
    >
    > Troy
    >
    > ----- Alessandro Zifiglio wrote: -----
    >
    > Provide some more details. At what stage of your pages life cycle are

    you
    > loading the controls. In what method. Are you loading the controls

    based on
    > a button click ?
    >
    >
    > "Troy" <> wrote in message
    > news:...
    > > Hi, I'm loading a usercontrol with image buttons into a panel.

    When
    > clicking the buttons the click event does not fire. Any suggestions?
    > >> Thanks,

    > > Troy
    > >
     
    Alessandro Zifiglio, Mar 1, 2004
    #4
    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. =?Utf-8?B?RGV2aW4gRmVuc3RlcmhlaW0=?=

    LoadViewState not firing when Control added with AddAt

    =?Utf-8?B?RGV2aW4gRmVuc3RlcmhlaW0=?=, Jul 18, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    3,554
    Jyoti Ballabh
    Nov 26, 2009
  2. JoakimR
    Replies:
    3
    Views:
    3,692
    John Saunders
    Jan 8, 2005
  3. Replies:
    1
    Views:
    1,478
  4. KJ
    Replies:
    0
    Views:
    136
  5. Replies:
    2
    Views:
    797
Loading...

Share This Page