Stage of a custom control's lifecycle that tag attributes are set

H

Helen

I've got a set of custom dropdowns that know how to get their values
from a datasource. I'm having problems loading the options before the
selected option is set.

I've got an abstract base class (VanillaDropdown) and various
subclasses that load the data from various sources. I want the base
class to automatically call the method the subclasses override to add
their options.

The code needs to be run after the child class' constructor has
finished running, but before the selected value property is set. I've
tried overriding init, but this seems to be too late.

Does anyone have any insight into the way custom controls are created
that could help me?

Am I just doing this in the wrong way for ASP.NET? I don't really like
the idea of having to do a databind in the code behind for every
single dropdown on the site because we use them extensively. It just
makes sense to me to be able to have a component that I can pop on a
form that will display numbers between <start> and <finish>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top