By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?
Nov 28 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Developer_Software" <De***************@discussions.microsoft.com> wrote in
message news:E7**********************************@microsof t.com...
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?

Nov 28 '05 #2

P: n/a
Thanks, Karl:

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

"Karl Seguin" wrote:
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

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Developer_Software" <De***************@discussions.microsoft.com> wrote in
message news:E7**********************************@microsof t.com...
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?


Nov 28 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.