Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 25, 2010 08:08 PM by caltrop
Feb 25, 2010 08:08 PM|LINK
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. Each user controls also houses a number of other controls (let's say A has textboxes, B has dropdowns, and
C has radio buttons).
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).
The 'remove' button on each control removes a control from the user control's control list.
The 'submit' button returns a list of all values from the controls in the user control's control list.
I want to have these user controls inherit from a base class, but I am running into some trouble. I moved the add, remove, and submit buttons to the base class and removed them from the child classes (A,B, and C). 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. Am I going about this the wrong way? Any suggestions would help.
page event cycle