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

  • Thread starter Thread starter jaffarkazi
  • Start date Start date
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
 
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
 
Back
Top