Rex,
>I have a business object I instantiate in the master page, but I also use it in a content page. What I am doing now is to conditionally create the business object if it does not exist using the GetBizObj method. Is there a better way to do this?
You could create a static property that holds a reference to this business object and use lazy loading to instantiate it. For example:
public static MyBizObj BizObj
{
get
{
if (_bizObj == null)
{
_bizObj = new MyBizObj();
}
return _bizObj;
}
}
private static MyBizObj _bizObj;
You can then reference the business object from anywhere in your application.
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com