Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set DataSource on controls within a UserControl?
Message
From
15/04/2009 14:27:59
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
15/04/2009 13:59:01
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01395026
Message ID:
01395034
Views:
44
>I have created my first asp.net UserControl that I will use in several places throughout my app. It contains a FormView to display fields of the record in a DataTable.
>
>It all seems fine, except, I can't figure out how to set the DataSource on the FormView that is within the UserControl. I want to set the DataSource in a method in code-behind.
>
>I see from intellisense that the UserControl does not have a DataSource property, but it does have a DataBind method. I can imagine that one might need to set different DataSources on multiple controls within a UserControl, so there must be some method for drilling into a UserControl, but I cannot figure it out.
>
>Since UT will not let me post aspx code (it always gives an error when I try to post asp.net code), please see the code at this link on StackOverflow:
>
>http://stackoverflow.com/questions/752935/set-datasource-on-controls-within-asp-net-usercontrol
>-

I have you DOWN feedback. Just kidding.
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform