How to get user control and the page to work together?

Apr 26, 2007 at 3:41 AM
Hi

I want to find a way to manage the communication between user controls on a page and that page. Since they are all in the same module. One of the way to do this would be for them to share the same controller. This way events could be raised and acted upon by user control or the page itself as needed.

Right now, a presenter is always using CreateNew for its controller. I naively tried to use ServiceDependency on the controller and asp.net complained that the controller wasn't part of the context.

In our solution, we modified the user control to also be able to use a presenter.

Any ideas?

Thanks

Phil
Apr 26, 2007 at 2:42 PM
I found an answer to my problem. I don't know if it's the best practice the WCSF team wants to use but I think it satisfies my needs. The answer is to apply the pattern discussed in
http://www.codeproject.com/aspnet/EventsAcrossUCs.asp

Regards