mad_potty_head Posted July 17, 2007 Share Posted July 17, 2007 Hi all,I want to add a CollapsiblePanelExtender through runtime.How can I do such a thin ??? thnx.Regards,mad_potty_head Link to comment Share on other sites More sharing options...
mad_potty_head Posted July 17, 2007 Author Share Posted July 17, 2007 I have just made a solution for this problem, but if any one has a better one plz send it.using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using AjaxControlToolkit;public partial class test : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { ScriptManager s = new ScriptManager(); CollapsiblePanelExtender c = new CollapsiblePanelExtender(); Label l = new Label(); Panel p = new Panel(); l.Text = "test"; l.ID = "label1"; p.GroupingText = "test body"; p.ID = "panel1"; c.TargetControlID = p.ID; c.ExpandControlID = l.ID; c.CollapseControlID = l.ID; form1.Controls.Add(s); form1.Controls.Add©; form1.Controls.Add(l); form1.Controls.Add(p); }} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.