I have an asp:DetailsView
with several columns, e.g. Foo, Bar.
I want to fill it with an anonymous type, i.e.:
gridView.DataSource = new { Foo = 1, Bar = "2" };
gridVeew.DataBind();
But getting next error:
Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource.
How can I do what I want?