Custom DropdownList Control

P

Proteus

Hi,

I am trying to extend the ASP.NET 2.0 DropDown List control. I have
created a new custom control and inherited from the ASP.NET control.
This works fine and I can drag it on to my web page from the toolbox.

I have added a public method to the class that goes to the database,
fetches data and then binds to the dataset. I cann this code from the
onload event of my web page.

This all seems to work fine when I debug. The debugger jumps into the
custom class and i can see the data being returned and the control
becomes loaded with items. So the databind seems to work fine. The only
problem is that it never actualy displays the data on the page. The
drop down is empty.

I'm clearly doing soemthing wrong or missing a key step. It looks like
the control gets the data and then does not render properly.

Any ideas?

Thanks,

Proteus.
 

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,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top