I am having trouble getting my datasource linked to my repeater through this code
protected void Page_Load(object sender, EventArgs e)
{
//HiddenField used as a placholder
HiddenField username = list.FindControl("username") as HiddenField;
//list is a DataList containing all of the user names
list.DataSource = Membership.GetAllUsers();
list.DataBind();
//Creates a string for each user name that is bound to the datalist
String user = username.Value;
//profilelist is a repeater containing all of the profile information
//Gets the profile of every member that is bound to the DataList
//Repeater is used to display tables of profile information for every user on
// the site in a single webform
profilelist.DataSource = Profile.GetProfile(user);
profilelist.DataBind();
}
I am getting the error message
An invalid data source is being used for profilelist. A valid data source must implement either IListSource or IEnumerable.
I forgot to post this up but for anyone that needs to do something similar here is the code behind that works
At the moment this is displaying about 15 user names and providing an ability to link to each of theses users respective profiles.