If I've got a setup where my master page has a member which is an EF generated object, and I want to use this member then within the page itself (but have need for it within the master page as well).
Currently I've got a using loop within the Master Page Page_Init event to establish the member. However if then I try to get any properties of this within the Page I get an error about "The ObjectContext instance has been disposed...", which is fair enough (It is within it's own using loop, however that's a different OC instance, so it's throwing this error.)
What's the best/preferred way around this situation? Is it to open the Object Context within the MasterPage pre_init event, and then dispose of it during the Page_Dispose event of the Master Page, or use a second OC Instance in the Page, and just pull a local version of the EF object by checking it's ID against the Master Page's object ID?
Thanks, Psy