Page event cycle for subclassed controlshttp://forums.asp.net/t/1530019.aspx/1?Page+event+cycle+for+subclassed+controlsThu, 25 Feb 2010 20:08:46 -050015300193701326http://forums.asp.net/p/1530019/3701326.aspx/1?Page+event+cycle+for+subclassed+controlsPage event cycle for subclassed controls <p>I have created three user controls (lets call them A,B, and C), each contains three controls: an add button, a remove button, and a submit button. &nbsp;Each user controls also houses a number of other controls (let's say A has textboxes, B has dropdowns, and C has radio buttons).</p> <p>The 'add' button on each control adds a control to the the user control's control list (ie. A.Controls.add(new textbox), B.Controls.add(new dropdown), etc).</p> <p>The 'remove' button on each control removes a control from the user control's control list.</p> <p>The 'submit' button returns a list of all values from the controls in the user control's control list.</p> <p><br> </p> <p>I want to have these user controls inherit from a base class, but I am running into some trouble. &nbsp;I moved the add, remove, and submit buttons to the base class and removed them from the child classes (A,B, and C). &nbsp;When I try to access the buttons through the page_load method of a child class, they return null as they don't exist yet for the base class. &nbsp;Am I going about this the wrong way? &nbsp;Any suggestions would help.</p> 2010-02-25T20:08:46-05:00