J
John
Hi all,
I'm having a little problem understanding the concepts of dynamically
loading/unloading user conrols:
1. If I have a couple of usercontrols embedded within a few tables cells on
my page, setting the usercontrol's visible to false still fires the
Page_Load event. Isn't this unnecessary overhead when it doesn't even show
in my page.
2. For my usercontrols to be able to see one another's methods, do I have to
define the usercontrol within the code-behind of each usercontrol I wish to
reference?
3. To dynamically load/unload usercontrols, must I register them at least
within my page at design-time? This seems 'un-dynamic' to me.
4. What method do I use to run code the first time my user control is
dynamically loaded. I don't want to run the code again after that unless it
is removed then re-loaded again.
There clearly is much for me to learn about usercontrols. If the above four
questions could please be answered and perhaps a pointer to some good online
reading material, I really would appreciate this!
Thanks.
Regards
John.
I'm having a little problem understanding the concepts of dynamically
loading/unloading user conrols:
1. If I have a couple of usercontrols embedded within a few tables cells on
my page, setting the usercontrol's visible to false still fires the
Page_Load event. Isn't this unnecessary overhead when it doesn't even show
in my page.
2. For my usercontrols to be able to see one another's methods, do I have to
define the usercontrol within the code-behind of each usercontrol I wish to
reference?
3. To dynamically load/unload usercontrols, must I register them at least
within my page at design-time? This seems 'un-dynamic' to me.
4. What method do I use to run code the first time my user control is
dynamically loaded. I don't want to run the code again after that unless it
is removed then re-loaded again.
There clearly is much for me to learn about usercontrols. If the above four
questions could please be answered and perhaps a pointer to some good online
reading material, I really would appreciate this!
Thanks.
Regards
John.