LoadControl don'i fire event

Discussion in 'ASP .Net Web Controls' started by Stefano Rossi, Nov 18, 2003.

  1. I need load a lot of usercontrol runtime in a WebForm.
    The controls are displayed correctly, but the event
    definited inside doesn't work.

    For example when I click on a button in the usercontrol
    the webform is posted and reloaded but the usercontrol
    code is not execute.

    Why??? Please help me

    Bye

    Sorry for my English!
     
    Stefano Rossi, Nov 18, 2003
    #1
    1. Advertising

  2. Stefano Rossi

    Guest Guest

    COuld it be that your user control is not associated with
    the right codebehind? Look at the:
    <%@ Control... %>
    directive at the top of your page.
    Make sure that the Codebehind and Inherits attributes are
    correct. (I had this problem when I copy and paste
    controls...)

    >-----Original Message-----
    >I need load a lot of usercontrol runtime in a WebForm.
    >The controls are displayed correctly, but the event
    >definited inside doesn't work.
    >
    >For example when I click on a button in the usercontrol
    >the webform is posted and reloaded but the usercontrol
    >code is not execute.
    >
    >Why??? Please help me
    >
    >Bye
    >
    >Sorry for my English!
    >.
    >
     
    Guest, Nov 18, 2003
    #2
    1. Advertising

  3. Stefano Rossi

    Guest Guest

    LoadControl don't fire event

    The control is OK.

    If I include the control in the webform directly the
    usercontrol works properly (the events are fired), but if
    the webform load runtime the usercontrol the events aren't
    fired.


    >-----Original Message-----
    >COuld it be that your user control is not associated with
    >the right codebehind? Look at the:
    ><%@ Control... %>
    >directive at the top of your page.
    >Make sure that the Codebehind and Inherits attributes are
    >correct. (I had this problem when I copy and paste
    >controls...)
    >
    >>-----Original Message-----
    >>I need load a lot of usercontrol runtime in a WebForm.
    >>The controls are displayed correctly, but the event
    >>definited inside doesn't work.
    >>
    >>For example when I click on a button in the usercontrol
    >>the webform is posted and reloaded but the usercontrol
    >>code is not execute.
    >>
    >>Why??? Please help me
    >>
    >>Bye
    >>
    >>Sorry for my English!
    >>.
    >>

    >.
    >
     
    Guest, Nov 21, 2003
    #3
    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. Replies:
    16
    Views:
    643
    Jarek Zgoda
    Aug 1, 2005
  2. Replies:
    4
    Views:
    551
  3. Stefan

    Button in WebCustomControl don't fire the onclick event, why?

    Stefan, Jul 8, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    241
    Stefan
    Jul 9, 2003
  4. Wenceslao Leon

    ImageButton in template column in edit mode don't fire event

    Wenceslao Leon, Sep 13, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    152
    Wenceslao Leon
    Sep 13, 2003
  5. just_jt
    Replies:
    1
    Views:
    713
    Ben Lovell
    Aug 25, 2004
Loading...

Share This Page