Carrotware.CMS.UI.Controls.TwoLevelNavigation.OnInit C# (CSharp) Method

OnInit() protected method

protected OnInit ( EventArgs e ) : void
e System.EventArgs
return void
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (cssText != null) {
                if (!this.InsertCssEarly) {
                    this.Page.Header.Controls.Add(cssText);
                } else {
                    int indexPos = 2;
                    if (this.Page.Header.Controls.Count > indexPos) {
                        this.Page.Header.Controls.AddAt(indexPos, new Literal { Text = "\r\n" });
                        this.Page.Header.Controls.AddAt(indexPos, cssText);
                    }
                }
            }
        }