I am trying to assign a PagedDataSource to ExecuteReader() but I get the error saying it needs to be ICollection.
I want all the data it returns as it is going to be assigned in a repeater. At first i just assigned the repeater to the cmd.ExecuteReader() and it worked ok, now they want paging and I'm not sure how to alter the query to produce an Array.
conn.Open();
var cmd = new SqlCommand("[safetyGuidanceSearch]", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@iwc", inwardCode);
cmd.Parameters.AddWithValue("@owc", outwardCode);
var objPds = new PagedDataSource();
objPds.DataSource = cmd.ExecuteReader();// turn into an array
What should I be trying to do?