/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnInit(EventArgs e) { CurrentPageType = ThemeHelper.GetCurrentPageType(); //If an alternate page should be served it has to be done in this early state to avoid //unnecessary duplicate code execution. SwitchPage(); base.OnInit(e); }