LoadControl don'i fire event

S

Stefano Rossi

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!
 
G

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...)
 
G

Guest

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top