Databinding in a user control that contains another user control

S

StraussGuy

I have a user control that I've created the function of which is simply to handle data retrieval from an access database. (FWIW, it implements IListSource so that I can bind the control to the DataSource property of the appropriate consuming controls.)

I've nested this user control inside another user control that consists of a number of visible controls to display to the user at run-time, one of which is a databound drop-down list, "ddlLabels". I made this second user control by converting an ASP.NET page (that worked fine) to a control.

Unfortunately, I'm not able to bind the drop-down list in the user control to the data control when the control loads. I've tried to do this from both the UserControl_Load and OnLoad methods (but not both at the same time!), but to no avail. I thought it should be a simple statement: ddlLabels.DataBind()

I'd really rather not have to write extra code in the hosting pages if I absolutely don't have to.

Any thoughts? Advice?

the straussGuy
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top