protected override void OnInit(EventArgs e) { base.OnInit(e); // page will be null if the control panel initial twice, it will be removed in the second time. if (this.Page != null) { this.ID = "ControlBar"; this.FileUploader = new DnnFileUpload { ID = "fileUploader", SupportHost = false }; this.Page.Form.Controls.Add(this.FileUploader); this.LoadCustomMenuItems(); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); //page will be null if the control panel initial twice, it will be removed in the second time. if (Page != null) { ID = "ControlBar"; var gettingStarted = DnnGettingStarted.GetCurrent(Page); if (gettingStarted == null) { gettingStarted = new DnnGettingStarted(); Page.Form.Controls.Add(gettingStarted); } FileUploader = new DnnFileUpload { ID = "fileUploader", SupportHost = false }; Page.Form.Controls.Add(FileUploader); } }