I am constructing a c#/.net website.
The site uses master pages and update panels.
I have a situation where I have a usercontrol in the page, that needs to update a user control in the master page and vice versa.
I know how to construct a delegate between the usercontrol and the page, or usercontrol and master page, but i’m unsure about a couple of things as my knowledge of .net isn’t that great.
1) How to construct a delegate between usercontrol -> page -> master page (2 levels)
2) The same backwards usercontrol -> master page -> page
I’m not sure if any of the components of 1) and 2) could be shared. For instance a single delegate event that spans the 2 levels and works both ways.
I’d appreciate any advice/examples.
Thanks in advance.
I cannot be too sure from your question, but perhaps you need to know that you can declare the delegate at the namespace level?
EDIT
I think I understand a bit better…see if this is what you are looking for:
This is the code from the ‘.cs’ files of a Site.Master page, and a WebUserControl…the delegate is declared globally in the namespace, within the master page, and the user control declares an event of that delegate type: