Ejemplo n.º 1
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Load" /> event.
        /// </summary>
        /// <param name="e">The <see cref="T:System.EventArgs" /> object that contains the event data.</param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!Page.IsPostBack)
            {
                widgityControl = new WidgityControl
                {
                    ID           = ID = this.ID + "_widgityControl",
                    EntityTypeId = EntityTypeCache.Get(typeof(Block)).Id,
                    EntityGuid   = BlockCache.Guid,
                };
                phPlaceholder.Controls.Add(widgityControl);
                widgityControl.DataBind();
            }
        }
Ejemplo n.º 2
0
        public override List <Control> DisplayCoursePage(CoursePage coursePage, Control parentControl)
        {
            {
                var            controls       = new List <Control>();
                WidgityControl widgityControl = new WidgityControl
                {
                    ID = this.Id + "_widgityControl"
                };
                parentControl.Controls.Add(widgityControl);
                controls.Add(widgityControl);

                widgityControl.EntityTypeId = EntityTypeCache.GetId(typeof(CoursePage)).Value;
                widgityControl.EntityGuid   = coursePage.Guid;
                widgityControl.DataBind();

                return(controls);
            }
        }