I have user control called 'Header.asxc' that is registered in my master page. That user control has an image link. The clicking of this link needs to cause a dropdown on the main page to repopulate. I am comforable with delegatges, with populating the dropdown etc... My problem is I cant find the usercontrol from the page, in order to set the function event. I got this work previously when the user control was registered on the page in question but this case with the master page has me confused. Here is a summary of the set up. 1. I put this in the Header.ascx usercontrol that is registered by the Master page. public Delegate locReloadCompanyDropdown;2. Further down in that page in the relevent _Click event, I put this. locReloadCompanyDropdown.DynamicInvoke();3. Back in the main page I declared these.. public delegate void reloadCompanies();
private event reloadCompanies doReloadCompanies;4. Finally I try to set the delegate doReloadCompanies += new reloadCompanies(PopulateCompanyDropdown);
//Page.Header.locReloadCompanyDropdown = doReloadCompanies;
//Header.locReloadCompanyDropdown = doReloadCompanies;You can see a couple of attempts I have made remarked out in the code above. Neither work. What am I missing here? Thanks all.
View Complete Post