views:

500

answers:

1

Hi,

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

Is there a particular event or contsructor I should override?

+3  A: 

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

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);
        }
    }
}
Scott