Why my collapsible Panel doesn't read the ClientID from my web User Control?http://forums.asp.net/t/1344613.aspx/1?Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Fri, 07 Nov 2008 18:11:38 -050013446132729748http://forums.asp.net/p/1344613/2729748.aspx/1?Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Why my collapsible Panel doesn't read the ClientID from my web User Control? <p><u>This is&nbsp;a content page Mypage.aspx from my MasterPage</u></p> <font color="#2b91af" size="2"> <p>controls_Exampletry</font><font size="2"> myControl = (</font><font color="#2b91af" size="2">controls_Exampletry</font><font size="2">)Page.LoadControl(</font><font color="#a31515" size="2">&quot;controls/Exampletry.ascx&quot;</font><font size="2">);&nbsp; //loading a web user control that contain a panel inside this object</p> </font><font size="2"> <p>AjaxControlToolkit.</font><font color="#2b91af" size="2">CollapsiblePanelExtender</font><font size="2"> cpe1 = </font><font color="#0000ff" size="2">new</font><font size="2"> AjaxControlToolkit.</font><font color="#2b91af" size="2">CollapsiblePanelExtender</font><font size="2">();</font></p> <p><font size="2">&nbsp;cpe1.ID = </font><font color="#a31515" size="2">&quot;CollapsiblePanelExtender&quot;</font><font size="2">; </font></p> <p><font size="2">cpe1.TargetControlID = myControl.StepPanel.ClientID;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //This is the line that have the problem, It doesn't want to find the clientID...why?</font></p> <p><u>Web user Control Exampletry.ascx:</u></p> <font size="2"><font size="2"></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#2b91af" size="2">Panel</font><font size="2"> StepPanel</font></font><font size="2"> <p>{</p> <p></font><font color="#0000ff" size="2">&nbsp;&nbsp; get</font><font size="2"> { </font><font color="#0000ff" size="2">return</font><font size="2"> ContentPanelStep; }&nbsp;&nbsp; //This is just the ID of my panel</font></p> <p><font size="2">}</font></p> <p><font size="2"></font>&nbsp;</p> <p><font size="2">The error says this: <strong>Exception Details: </strong>System.InvalidOperationException: The TargetControlID of 'CollapsiblePanelExtender' is not valid. A control with ID 'MyControl1_ContentPanelStep' could not be found.<br> </p> </font> 2008-11-06T20:12:07-05:002729778http://forums.asp.net/p/1344613/2729778.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>Are you adding your user control to the Page's control collection after loading it? If you don't do that, then it won't be rendered and won't have a ClientID or a UniqueID. Alternatively, you can try setting the TargetControID property with the user control panel's ID and then add the CollapsiblePanelExtender and the user control to the Page Controls collection and see if it works.<br> </p> 2008-11-06T20:33:01-05:002731420http://forums.asp.net/p/1344613/2731420.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>Would you mind to send me an example anbout this with my code. I am sore it of new in C#</p> <p>Thank you so much for your help</p> 2008-11-07T13:53:25-05:002731430http://forums.asp.net/p/1344613/2731430.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <pre class="prettyprint" id="codeSnippet186735">This is the web user control .ascx &lt;%@ Control Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;Exampletry.ascx.cs&quot; Inherits=&quot;controls_Exampletry&quot; %&gt; &lt;asp:Panel ID=&quot;ContentPanelStep&quot; runat=&quot;server&quot;&gt; // the panel which it is going to be the TargetID for the collapsiblePanel &lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot; Text=&quot;Testing&quot; OnClick=&quot;Button1_Click&quot; /&gt; //The button is inside the Panel with an event, this button is the one that is triggering. &lt;/asp:Panel&gt; This is the web user control ascx.cs: public partial class controls_Exampletry : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { //This is the event that is not triggering } public Panel StepPanel { get { return ContentPanelStep; } //this is my panel and inside this panel there is a button. I make it public so I can call it for the aspx. page } } This is my code in my page: protected void Page_Load(object sender, EventArgs e) { controls_Exampletry myControl = (controls_Exampletry)Page.LoadControl(&quot;controls/Exampletry.ascx&quot;); //Loading hte WebUserControl into am object called mycontrol myControl.ID= = &quot;MyControl1&quot;; //Seting and ID for this object HtmlTableRow stepRow = new HtmlTableRow(); //This is a dynamic Row HtmlTableCell stepCell = new HtmlTableCell(); //This is a dynamic Cell AjaxControlToolkit.CollapsiblePanelExtender cpe1 = new AjaxControlToolkit.CollapsiblePanelExtender(); //creating the Collapsible Panel from server side and give it an instance or object cpe1.ID = &quot;CollapsiblePanelExtender&quot;; // giving an ID to the Collapsible Panel cpe1.TargetControlID = myControl.StepPanel.UniqueID; //This is the line that I think is the problem, I am callling the ID for the panel that is contained in the web user control . I tried ClientID and it didn't work neither. I can see the panel with the button but the event from that button inside that panel is not triggering. stepCell.Controls.Add(myControl); stepCell.Controls.Add(cpe1); stepRow.Cells.Add(stepCell); StepsTable.Rows.Add(stepRow); //I have a table with ID=StepsTable that will received this adding of the row } </pre> <p>&nbsp;</p> 2008-11-07T13:56:17-05:002731597http://forums.asp.net/p/1344613/2731597.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>First off, I'd suggest that you move your control loading code to the Page Init or the Page PreRender method instead of the Page Load method, like this:</p> <pre class="prettyprint" id="codeSnippet186735"> protected void Page_Init(object sender, EventArgs e)<br> { <br> controls_Exampletry myControl = (controls_Exampletry)Page.LoadControl(&quot;controls/Exampletry.ascx&quot;); //Loading hte WebUserControl into am object called mycontrol<br> myControl.ID = &quot;MyControl1&quot;; //Seting and ID for this object</pre> <pre class="prettyprint" id="codeSnippet186735"> HtmlTable StepsTable = new HtmlTable();<br> HtmlTableRow stepRow = new HtmlTableRow(); //This is a dynamic Row<br> HtmlTableCell stepCell = new HtmlTableCell(); //This is a dynamic Cell</pre> <pre class="prettyprint" id="codeSnippet186735"> AjaxControlToolkit.CollapsiblePanelExtender cpe1 = new AjaxControlToolkit.CollapsiblePanelExtender(); //creating the Collapsible Panel from server side and give it an instance or object<br> stepCell.Controls.Add(myControl);</pre> <pre class="prettyprint" id="codeSnippet186735"> stepCell.Controls.Add(cpe1);<br></pre> <pre class="prettyprint" id="codeSnippet186735"> cpe1.ID = &quot;CollapsiblePanelExtender&quot;; // giving an ID to the Collapsible Panel<br> cpe1.TargetControlID = myControl.StepPanel.ID;<br> //If the above line gives a problem, then try saying stepCell.FindControl(myControl.ID).ID<br><br> stepRow.Cells.Add(stepCell);<br> StepsTable.Rows.Add(stepRow); //I have a table with ID=StepsTable that will received this adding of the row<br> }</pre> <pre class="prettyprint" id="codeSnippet186735">Lastly, in your case there are many complications like dynamically adding extenders (not just controls), dynamically adding user controls, trying to ask the extender to access a control inside the user control and many other things. So, I'm not sure whether the above code would still start working from the word go. So, you can keep posting your responses here, if things don't work.<br></pre> 2008-11-07T14:58:35-05:002731634http://forums.asp.net/p/1344613/2731634.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>I have this error:</p> <p><strong>Exception Details: </strong>System.InvalidOperationException: The TargetControlID of 'CollapsiblePanelExtender' is not valid. A control with ID 'ContentPanelStep' could not be found.<br> </p> 2008-11-07T15:10:28-05:002731689http://forums.asp.net/p/1344613/2731689.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <pre class="prettyprint" id="codeSnippet186735">Try the following: <br></pre> <pre class="prettyprint" id="codeSnippet186735">protected void Page_Init(object sender, EventArgs e)<br> { <br> controls_Exampletry myControl = (controls_Exampletry)Page.LoadControl(&quot;controls/Exampletry.ascx&quot;); //Loading hte WebUserControl into am object called mycontrol<br> myControl.ID = &quot;MyControl1&quot;; //Seting and ID for this object</pre> <pre class="prettyprint" id="codeSnippet186735"> Page.Controls.Add(myControl); </pre> <pre class="prettyprint" id="codeSnippet186735"> AjaxControlToolkit.CollapsiblePanelExtender cpe1 = new AjaxControlToolkit.CollapsiblePanelExtender(); //creating the Collapsible Panel from server side and give it an instance or object<br> cpe1.ID = &quot;myCollapsiblePanelExtender&quot;; // giving an ID to the Collapsible Panel<br> cpe1.TargetControlID = myControl.StepPanel.ID;<br> //If the above line gives a problem, then try saying cpe1.TargetControlID = Page.FindControl(myControl.ID).ID</pre> <pre class="prettyprint" id="codeSnippet186735"> Page.Controls.Add(cpe1); <br></pre> <pre class="prettyprint" id="codeSnippet186735"> HtmlTable StepsTable = new HtmlTable();<br> HtmlTableRow stepRow = new HtmlTableRow(); //This is a dynamic Row<br> HtmlTableCell stepCell = new HtmlTableCell(); //This is a dynamic Cell</pre> <pre class="prettyprint" id="codeSnippet186735"> stepCell.Controls.Add(myControl);</pre> <pre class="prettyprint" id="codeSnippet186735"> stepCell.Controls.Add(cpe1);<br></pre> <pre class="prettyprint" id="codeSnippet186735"> stepRow.Cells.Add(stepCell);<br> StepsTable.Rows.Add(stepRow); //I have a table with ID=StepsTable that will received this adding of the row<br> }</pre> 2008-11-07T15:27:54-05:002731750http://forums.asp.net/p/1344613/2731750.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p><u>Using this line</u> : cpe1.TargetControlID&nbsp; = mycontrol.StepPanel.ID</p> <p>Give this error:</p> <p><strong>Exception Details: </strong>System.InvalidOperationException: The TargetControlID of 'myCollapsiblePanelExtender' is not valid. A control with ID 'ContentPanelStep' could not be found.<br> </p> <p>&nbsp;<u>Using this line</u>: cpe1.TargetControlID = Page.FindControl(myControl.ID).ID;&nbsp;&nbsp;&nbsp; </p> <p>Give me&nbsp;this error:</p> <p><strong>Exception Details: </strong>System.InvalidOperationException: Extender control 'myCollapsiblePanelExtender' cannot extend 'MyControl1'. Extender controls of type 'AjaxControlToolkit.CollapsiblePanelExtender' cannot extend controls of type 'ASP.controls_exampletry_ascx'.</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>The code:</p> <font size="2"></font><font color="#0000ff" size="2">protected</font><font size="2"> </font><font color="#0000ff" size="2">void</font><font size="2"> Page_Init(</font><font color="#0000ff" size="2">object</font><font size="2"> sender, </font><font color="#2b91af" size="2">EventArgs</font><font size="2"> e)</font><font size="2"> <p>{</p> </font><font color="#2b91af" size="2">controls_Exampletry</font><font size="2"> myControl = (</font><font color="#2b91af" size="2">controls_Exampletry</font><font size="2">)Page.LoadControl(</font><font color="#a31515" size="2">&quot;controls/Exampletry.ascx&quot;</font><font size="2">);</font><font size="2">myControl.ID = </font><font color="#a31515" size="2">&quot;MyControl1&quot;</font><font size="2">;</font><font size="2"> <p>Page.Controls.Add(myControl);</p> <p>AjaxControlToolkit.</font><font color="#2b91af" size="2">CollapsiblePanelExtender</font><font size="2"> cpe1 = </font><font color="#0000ff" size="2">new</font><font size="2"> AjaxControlToolkit.</font><font color="#2b91af" size="2">CollapsiblePanelExtender</font><font size="2">();</p> cpe1.ID = </font><font color="#a31515" size="2">&quot;myCollapsiblePanelExtender&quot;</font><font size="2">;</font><font size="2"> <p></font><font color="#008000" size="2">//cpe1.TargetControlID = Page.FindControl(myControl.ID).ID;</p> </font><font size="2"> <p>cpe1.TargetControlID = myControl.StepPanel.ID;</p> <p>Page.Controls.Add(cpe1); </p> </font><font color="#2b91af" size="2">HtmlTableRow</font><font size="2"> stepRow = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">HtmlTableRow</font><font size="2">();</font><font size="2"></font><font color="#2b91af" size="2">HtmlTableCell</font><font size="2"> stepCell = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">HtmlTableCell</font><font size="2">();</font><font size="2"> <p>stepCell.Controls.Add(myControl);</p> <p>stepCell.Controls.Add(cpe1);</p> <p>stepRow.Cells.Add(stepCell);</p> <p>StepsTable.Rows.Add(stepRow); </p> <p>}</p> </font> 2008-11-07T15:44:47-05:002731764http://forums.asp.net/p/1344613/2731764.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>Try this line:</p> <p>cpe1.TargetControlID = Page.FindControl(myControl.ID).<font><font size="2">StepPanel.</font></font>ID;&nbsp;&nbsp;&nbsp;&nbsp; <br> </p> 2008-11-07T15:48:19-05:002731794http://forums.asp.net/p/1344613/2731794.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>I add your line and there is an error that says </p> <p>System.web.UI.Control does not contain a definition for 'StepPanel'</p> <p>But then I try this:</p> <font color="#008000" size="2"> <p><strong>cpe1.TargetControlID = myControl.StepPanel.UniqueID;&nbsp; </strong></p> <p><strong>and it is working :):)&nbsp; BUt to make this line work I sacrificed the update panel from my web use control.</strong></p> <strong><font size="2"> <p>&lt;%</font><font color="#0000ff" size="2">@</font><font size="2"> </font><font color="#a31515" size="2">Control</font><font size="2"> </font><font color="#ff0000" size="2">Language</font><font color="#0000ff" size="2">=&quot;C#&quot;</font><font size="2"> </font><font color="#ff0000" size="2">AutoEventWireup</font><font color="#0000ff" size="2">=&quot;true&quot;</font><font size="2"> </font><font color="#ff0000" size="2">CodeFile</font><font color="#0000ff" size="2">=&quot;Exampletry.ascx.cs&quot;</font><font size="2"> </font><font color="#ff0000" size="2">Inherits</font><font color="#0000ff" size="2">=&quot;controls_Exampletry&quot;</font><font size="2"> %&gt;</p> </font><font color="#0000ff" size="2"> <p>&lt;</font><font color="#a31515" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#a31515" size="2">Panel</font><font color="#000000" size="2"> </font><font color="#ff0000" size="2">ID</font><font color="#0000ff" size="2">=&quot;ContentPanelStep&quot;</font><font color="#000000" size="2"> </font><font color="#ff0000" size="2">runat</font><font color="#0000ff" size="2">=&quot;server&quot;&gt;</p> </font><font size="2"> <p></font><font color="#0000ff" size="2">&lt;</font><font color="#a31515" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#a31515" size="2">UpdatePanel</font><font size="2"> </font><font color="#ff0000" size="2">runat</font><font color="#0000ff" size="2">=&quot;server&quot;</font><font size="2"> </font><font color="#ff0000" size="2">ID</font><font color="#0000ff" size="2">=&quot;UpdatePanel1&quot;&gt;</p> </font><font size="2"> <p></font><font color="#0000ff" size="2">&lt;</font><font color="#a31515" size="2">ContentTemplate</font><font color="#0000ff" size="2">&gt;</p> </font><font size="2"></font><font color="#0000ff" size="2">&lt;</font><font color="#a31515" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#a31515" size="2">Button</font><font size="2"> </font><font color="#ff0000" size="2">ID</font><font color="#0000ff" size="2">=&quot;Button1&quot;</font><font size="2"> </font><font color="#ff0000" size="2">runat</font><font color="#0000ff" size="2">=&quot;server&quot;</font><font size="2"> </font><font color="#ff0000" size="2">Text</font><font color="#0000ff" size="2">=&quot;Testing&quot;</font><font size="2"> </font><font color="#ff0000" size="2">OnClick</font><font color="#0000ff" size="2">=&quot;Button1_Click&quot;</font><font size="2"> </font><font color="#0000ff" size="2">/&gt;</font><font size="2"> </font></font><font size="2"> <p></font><font color="#0000ff" size="2">&lt;/</font><font color="#a31515" size="2">ContentTemplate</font><font color="#0000ff" size="2">&gt;</p> </font><font size="2"> <p></font><font color="#0000ff" size="2">&lt;</font><font color="#a31515" size="2">Triggers</font><font color="#0000ff" size="2">&gt;</p> </font><font size="2"></font><font color="#0000ff" size="2">&lt;</font><font color="#a31515" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#a31515" size="2">AsyncPostBackTrigger</font><font size="2"> </font><font color="#ff0000" size="2">ControlID</font><font color="#0000ff" size="2">=&quot;Button1&quot;</font><font size="2"> </font><font color="#ff0000" size="2">EventName</font><font color="#0000ff" size="2">=&quot;Click&quot;</font><font size="2"> </font><font color="#0000ff" size="2">/&gt;</font><font size="2"> </font><font size="2"> <p></font><font color="#0000ff" size="2">&lt;/</font><font color="#a31515" size="2">Triggers</font><font color="#0000ff" size="2">&gt;</font><font size="2"> </p> <p></font><font color="#0000ff" size="2">&lt;/</font><font color="#a31515" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#a31515" size="2">UpdatePanel</font><font color="#0000ff" size="2">&gt;</font><font size="2"> </p> </font><font color="#0000ff" size="2"> <p>&lt;/</font><font color="#a31515" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#a31515" size="2">Panel</font><font color="#0000ff" size="2">&gt;</font></p> <p><font color="#0000ff" size="2"></font>&nbsp;</p> <p><font color="#0000ff" size="2">When I set this update panel in the Web use control I have this error, do you know why??</font></p> <p><font color="#0000ff" size="2">Exception Details: System.ArgumentException: Cannot unregister UpdatePanel with ID 'UpdatePanel1' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.<br> Parameter name: updatePanel</p> </font></strong> 2008-11-07T15:55:32-05:002731829http://forums.asp.net/p/1344613/2731829.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>You can try using the ScriptManagerProxy control in your user control class:</p> <p><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanagerproxy.aspx" title="http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanagerproxy.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanagerproxy.aspx</a> </p> <p>Also, see if this helps:</p> <p><a href="http://msdn.microsoft.com/en-us/library/bb398780.aspx" title="http://msdn.microsoft.com/en-us/library/bb398780.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/bb398780.aspx</a> <br> </p> <p>&nbsp;</p> 2008-11-07T16:11:41-05:002731884http://forums.asp.net/p/1344613/2731884.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>For the First Link:&nbsp;When&nbsp;I use the&nbsp; ScriptManager proxy I still have the same error</p> <p>For the second Lin: That is not quiet what&nbsp; I was looking for...Any another ideas. </p> <p>But the way thank you so much to help me with this coding..I am sore it of NEW in this C# stuff</p> Thanks :)<font color="#0000ff" size="2"></font><font color="#0000ff" size="2"> <p></font><font size="2">&nbsp;</p> </font> 2008-11-07T16:32:42-05:002731904http://forums.asp.net/p/1344613/2731904.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>Hey. No Problem. Check the following link out and see if that helps in any way:</p> <p><a href="http://msmvps.com/blogs/luisabreu/archive/2006/11/16/adding-removing-updatepanels-dynamicaly-from-a-page.aspx" title="http://msmvps.com/blogs/luisabreu/archive/2006/11/16/adding-removing-updatepanels-dynamicaly-from-a-page.aspx" target="_blank">http://msmvps.com/blogs/luisabreu/archive/2006/11/16/adding-removing-updatepanels-dynamicaly-from-a-page.aspx</a> </p> <p>You can try shifting your code to the Page PreInit event.</p> <p>&nbsp;</p> 2008-11-07T16:40:46-05:002731946http://forums.asp.net/p/1344613/2731946.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>Yeah I read that blog but he explained but he doesn't publis a coding answer :(</p> <p>I am sore it off new...in this c# stuff..</p> <p>thanks</p> 2008-11-07T17:03:32-05:002731955http://forums.asp.net/p/1344613/2731955.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>I try to use the Page_PreInit but&nbsp; I have this error:</p> <p><strong>Exception Details: </strong>System.NullReferenceException: Object reference not set to an instance of an object.</p> <p><font color="#ff0000">Refering to this&nbsp;&nbsp; Line 84:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StepsTable.Rows.Add(stepRow); </font></p> 2008-11-07T17:06:55-05:002731995http://forums.asp.net/p/1344613/2731995.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>If it's a NullReferenceException then that means that one of the objects was not instanciated in memory. So, in your case, check whether the StepsTable or the stepRow object has null value by putting a breakpoint at line number 84. If it does then try to figure out why it is null and why it is not getting any value.<br> </p> 2008-11-07T17:24:01-05:002732082http://forums.asp.net/p/1344613/2732082.aspx/1?Re+Why+my+collapsible+Panel+doesn+t+read+the+ClientID+from+my+web+User+Control+Re: Why my collapsible Panel doesn't read the ClientID from my web User Control? <p>It looks like putting inside Page_PreInit doesn't allow to load my stepCell with the controls that I want to...why?</p> 2008-11-07T18:11:38-05:00