How to ensure "child" ascx control loads before parent Load

J

jaffarkazi

Hi,
I have a .ascx control which holds company information which can be
edited. One of the controls inside this is an Address control. The
address control has country and state dropdowns loaded. When I open
the page in edit mode, I want the company control to pre-select the
country and database from the address control.

However, the address control is being loaded after the parent.
Therefore, the state and country dropdowns do not have the correct
data till the end.

How do I go about this?

Thanks in advance,
--Jaffar
 
T

Teemu Keiski

Hi,

you could use events to communicate between the controls, to signal when
something can be done. The other control could subscribe to address
control's Load event and do the thing when it's loaded (Load event is
raised)? Or in case "readiness" is signaled by some action, raise custom
event when it's done, the other control subscribes to this event and does
its job. I'm not perhaps getting your case here 100%, but the idea of using
events applies
 

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,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top