Override System.Web.Mvc.ViewMasterPage, where to make the call to capture from cache?

I need to get the value from the HttpCOntext.Items request cache, where should I do this?

Is there some specific event or contsructor I should override?

0


source to share


1 answer


ViewMasterPage is a subclass of Control; and you should be able to get it in the normal page event loop:



namespace MvcDemo.Views.Shared {
    public partial class Site : System.Web.Mvc.ViewMasterPage {
        protected override void OnLoad(EventArgs e) {
            string nowWhat = Context.Items["nowWhat"] as string;
            base.OnLoad(e);
        }
    }
}

      

+3


source







All Articles