dynamic user control event handling (VS.NET 2003 Ent)

G

Guest

Thanks in advance to anyone who can help :)

I've got a placeholder control WITHIN A USER CONTROL that has its contents
dynamically added and removed at runtime by a regular .aspx page.

At runtime, the placeholder control adds a dropdownlist where I would like
it to redirect the user to a different page dependent on the selection they
make from the dropdownlist.

I've tried writing the delegate and the event handler both in the
UserControl's code behind page (placing the delegate in the Page_Load) AND
the .aspx page the user control shows up in..and IT DOES NOT RESPOND to the
event

BTW, in the .aspx page the dynamic dropdownlist is created in the OnInit
method of the page.

Is this proper? I've read so many articles and I'm not sure as to why it is
not responding. In this situation, should the event be coded in the
usercontrol or the page it will show in?
 
K

Karl Seguin

The dropdownlist must be re-added and the event rehooekd on postback.
What's the mechanism for determining which dynamic control is loaded? Is it
placed within a Page.IsPostBack?

Karl
 
G

Guest

Thanks, Karl:

Rather than go through those complications, I simply wrote all of the event
handling within the usercontrol itself. Thanks anyway-
 

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,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top