help with events (i'm new to this)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Colin Robinson (ColinRobinson____at_cix.co.uk)
Date: 06/24/04


Date: Thu, 24 Jun 2004 22:25:48 +0100

I can see there is an issue with web user control events on postback but
dont fully understand how to implement a solution.

I have a button on my aspx page, when clicked it adds instances of my web
user control to a placeholder, it looks ok visually but events in the
usercontrol dont fire.How should I instatiate my usercontrol instances so
that events within them fire as expected?

I am currently using the sysntax on the clickevent of a button

dim ocontrol as mycontrol = loadcontrol("~Mycontrol.asax")
me.placeholder.controls.add(ocontrol)

Cheers


Quantcast