Wednesday, February 07, 2007

Hook that MasterPage.Init event if you want dynamically added controls to be around to handle events.

MasterPages sometimes interfere with your pages in the oddest of ways. Oren Ellenbogen shows a clever strategy for handling the creation of dynamically added controls (which you normally would add in OnPreInit.

You want to hook the base.Master.Init event. See this great post.

2 comments:

bjornoyvind said...

refering to a dead link...

Marc Brooks said...

Thanks, fixed the link-rot.