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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    835
    Jarek Zgoda
    Aug 1, 2005
  2. Replies:
    4
    Views:
    707
  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:
    458
    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:
    261
    Wenceslao Leon
    Sep 13, 2003
  5. just_jt
    Replies:
    1
    Views:
    1,192
    Ben Lovell
    Aug 25, 2004
  6. Guest

    Fire server side event before client side event

    Guest, Mar 17, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    832
    Ken Cox [Microsoft MVP]
    Mar 18, 2005
  7. Andy Fish

    load event doesn't fire unless init event is present

    Andy Fish, Jun 28, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    428
    Jonathan Mast
    Jul 7, 2005
  8. Bender
    Replies:
    2
    Views:
    491
    Thomas 'PointedEars' Lahn
    Oct 22, 2003
Loading...