Dynamic User Controls Event Handling

M

Majeti

In my web form to the place holder i'm loading different
User Controls depends on some conditions

for the user control which is loaded first time to the
place holder is able to fire event.

but Events are not firing for the User control which is
dynamically loaded second time in place first(in post back
request)
 
T

Teemu Keiski

I have a clue what it could be, but provide some sample how you are doing
the loading of the control?

You do realize that for control to raise events, it needs to be added to
Controls collection on the request it is displayed the first time and on
postback (relative to the control's addition to the Controls collection i.e
control is added on second request which is already postback for Page and
it's event is expected to be raised on third request when event is 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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top