I have a user control with public property Rating that looks like this on the web page:
<gui:FacilityThumb id="FacilityThumb" Rating='<%#Container.DataItem("numRatings")%>' runat="server" />
I'm trying to set a DataSource on the FacilityThumb user control above so I can bind data to the Rating property. However when I do this in the web page's code behind file, I get the following error:
Compiler Error Message: BC30456: 'DataSource' is not a member of 'System.Web.UI.UserControl'.
..on the following code:
objCmd.Connection.Open()
objReader = objCmd.ExecuteReader
FacilityThumb.DataSource = objReader
FacilityThumb.DataBind()
What am I doing wrong to get this error??