Brew.Webforms.Widget.OnInit C# (CSharp) 메소드

OnInit() 보호된 메소드

protected OnInit ( EventArgs e ) : void
e System.EventArgs
리턴 void
        protected override void OnInit(EventArgs e)
        {
            if (this.Page == null) {
                throw new InvalidOperationException("Brew Error: The page cannot be null.");
            }

            var formView = this.FindParent<FormView>();

            if (formView != null) {
                //formView.ItemCreated -= Widget.LoadHandler;
                //formView.ItemCreated += Widget.LoadHandler;
            }
            else {
                this.Page.Load -= Widget.LoadHandler;
                this.Page.Load += Widget.LoadHandler;
            }

            base.OnInit(e);
        }