protected override void OnInit(EventArgs e) { base.OnInit(e); if (Master != null) { System.Web.UI.MasterPage master = Master; while (master.Master != null) { master = master.Master; } if (!(master is Atomo.Web.MasterPage)) { throw new Exception("A Master Page tem que herdar de Atomo.Web.MasterPage!"); } this.jsContainer = ((Atomo.Web.MasterPage)master).JsContainer; this.cssContainer = ((Atomo.Web.MasterPage)master).CssContainer; } else { this.jsContainer = new JsContainer(); this.cssContainer = new CssContainer(); } this.Create(); }
public PageBuilder(ControlCollection controlCollection, CssContainer cssContainer, JsContainer jsContainer) { this.controlCollection = controlCollection; this.cssContainer = cssContainer; this.jsContainer = jsContainer; }