Can I set some kind of global variable for the length of a single Request, so that all the controls of the page can respond to it without having to pass it through to each of them?
For instance, if someone hit a Save button on my MasterPage, could I set something so that each UserControl on my Page can have a Page_Load like:
protected void Page_Load(object sender, EventArgs e)
{
if (isSaving) // isSaving is a global variable
{
saveData(); // save myself
}
loadData();
}
It just seems a lot easier than having a delegate from the masterpage call the Page's save function, which then calls UC1.saveData() to each UserControl, though I know that's better Object Oriented thinking.