Removing duplicate calls on an AspNet Page Load by using the MasterPage
This is often something that is never apparent but can improve performance. On the master page , you need to make a call, for example, to get the MembershipUser. MembershipUser user = Membership.GetUser(); Then on the page you need to do the same so you copy the code again. This results in two calls. For a current project, this means two WCF calls so there is a significant latency added to page rendering. A better solution is to make the User public on the master page and then use it (and avoid the second call). On the master page, change it to a self-initializing property (and avoid putting initialization into events like Page_Load) MembershipUser _User public MembershipUser User { get { if (_User == null ) { _User = Membership.GetUser(); } return _User; } } and then on the child pages use: protected v