/// <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(); } }
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); } }