Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Databinding in a user control that contains another user control

Reply
Thread Tools

Databinding in a user control that contains another user control

 
 
StraussGuy@hotpop.com
Guest
Posts: n/a
 
      01-07-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding expressions are only supported on objects that have a DataBinding event jobs ASP .Net 0 09-25-2007 11:54 PM
Gridview encoding, or how to run commands before gridview's default databinding, or, how do I disable default databinding at all? Sergei Shelukhin ASP .Net 1 11-12-2006 01:43 PM
Force databinding from an iframe page to the page that contains it? Luis Esteban Valencia ASP .Net 0 01-20-2005 04:39 PM
DataGrid Custom Column Error when DataBinding "does not contain a definition for 'DataBinding'" Earl Teigrob ASP .Net Datagrid Control 1 03-01-2004 04:52 AM
Regex problem, match if line contains <a>, unless it also contains <b> James Dyer Perl 5 02-20-2004 12:29 PM



Advertisments