I've got some homework to do, but I cannot go through this issue. I want my .aspx page to display my database records, one below another. In order to do this I use a GridView, while the data is stored in an ArrayList. This ArrayList is composed of User objects, where each user has a first name, last name etc. (all the common stuff).
My code looks like this:
GridView myDataGrid = new GridView(); myDataGrid.DataSource = myArrayList; myDataGrid.DataBind();
When I run thi thing in the browser, it keeps telling me: "The data source for GridView with id '' did not have any properties or attributes from which to generate columns. Ensure that your data source has content." - which is funny, since I know for sure that my arraylist contains exactly 4 User objects...
Could somebody help me please? What is the error in my code?
Tanks in advance.