Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set DataSource on controls within a UserControl?
Message
 
 
To
15/04/2009 13:59:01
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01395026
Message ID:
01395027
Views:
51
>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
>-

Hi Matt,

I think I was having the same issue as you and I discussed this problem here and in http://forums.asp.net/p/1266540/2381314.aspx#2381314
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform