/// ----------------------------------------------------------------------------- /// <summary> /// InstantiateIn is called when the Template is instantiated by the parent control /// </summary> /// <param name="container">The container control</param> /// ----------------------------------------------------------------------------- public void InstantiateIn(Control container) { if (!String.IsNullOrEmpty(Text)) { container.Controls.Add(new LiteralControl(Text + "<br/>")); } if (ItemType != ListItemType.Header) { var box = new DNNMultiStateBox(); box.AutoPostBack = AutoPostBack; box.ImagePath = ImagePath; foreach (DNNMultiState objState in States) { box.States.Add(objState); } box.DataBinding += Item_DataBinding; container.Controls.Add(box); } }
/// ----------------------------------------------------------------------------- /// <summary> /// InstantiateIn is called when the Template is instantiated by the parent control /// </summary> /// <param name="container">The container control</param> /// <history> /// [cnurse] 02/16/2006 created /// </history> /// ----------------------------------------------------------------------------- public void InstantiateIn(Control container) { if (!String.IsNullOrEmpty(Text)) { container.Controls.Add(new LiteralControl(Text + "<br/>")); } if (ItemType != ListItemType.Header) { var box = new DNNMultiStateBox(); box.AutoPostBack = AutoPostBack; box.ImagePath = ImagePath; foreach (DNNMultiState objState in States) { box.States.Add(objState); } box.DataBinding += Item_DataBinding; container.Controls.Add(box); } }