hi, I have two controls on a asp.net page, both of which I want to bind to different columns returned from a stored procedure. I can easily get one of the two to do bind, but not both - the code is as follows:
dim IntId As String
dim sqldata As SqlDataReader
IntId="4388"
sqldata = SqlHelper.ExecuteReader(connString, "sp_GetWhereHearListFromIntroducerID", IntId)
drop_wherehear_list.DataSource = sqldata
drop_wherehear_list.DataValueField = "ad_code"
drop_wherehear_list.DataBind()
Which works fine, but when I add the following code for the second dropdown I get an "Invalid attempt to FieldCount when reader is closed" error:
refid_list.DataSource = sqldata
refid_list.DataValueField = "bs_name"
refid_list.DataBind
The stored procedure returns two columns of data - surely it must be possible to bind another dropdown list to the other column, without having to do another round trip to the server?
Thanks for any help :)