What syntax do I use to load dropdown with an object?
IE I have a class "project". The method "LoadAll" loads "project" with thirty projects
Project object has a idProject parameter and a projectName
project objProj = new project();
objProj.LoadAll();
DropDownList ddTemp = new DropDownList();
ddTemp.DataSource = objProj;
ddTemp.DataValueField = "idProject";
ddTemp.DataTextField = "projectName";
ddTemp.DataBind();
error is "It must be either an IListSource, IEnumerable, or IDataSource".