Databinding in a user control that contains another user control

Discussion in 'ASP .Net' started by StraussGuy@hotpop.com, Jan 7, 2005.

  1. Guest

    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
     
    , Jan 7, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Dyer
    Replies:
    5
    Views:
    676
  2. qwerty
    Replies:
    3
    Views:
    9,318
    Scott Allen
    Sep 30, 2004
  3. Luis Esteban Valencia
    Replies:
    0
    Views:
    460
    Luis Esteban Valencia
    Jan 20, 2005
  4. jobs
    Replies:
    0
    Views:
    1,732
  5. Earl Teigrob
    Replies:
    1
    Views:
    437
    Shravan
    Mar 1, 2004
Loading...

Share This Page