M
Marina
Hi,
There is a component that is binding the results of a search to a DataList.
By clicking on an image in the datalist, the user can download that
particular item. We are using the DataKeys property to retrieve the ID (as
stored in the database), to then locate the item, and do some other stuff
and push the file out to the user.
The first time the search is performed, the user can download the file, and
the correct file gets downloaded. Let's say there were 10 results
However, the second time the search is done (different criteria), let's say
there were 20 results. Now, the first 10 results, the DataKeys property
returns the ID from the *first* search. For the last 10, the results are
correct.
So it seems the DataKeys property is not getting updated with the new
results, even though a new DataBind is taking place. So all the "extra"
rows, have a new entry in the DataKeys property, and this is correct. But
the first X rows, where X is the number of rows in the first result set, do
not.
Can anyone shed any light on this?
There is a component that is binding the results of a search to a DataList.
By clicking on an image in the datalist, the user can download that
particular item. We are using the DataKeys property to retrieve the ID (as
stored in the database), to then locate the item, and do some other stuff
and push the file out to the user.
The first time the search is performed, the user can download the file, and
the correct file gets downloaded. Let's say there were 10 results
However, the second time the search is done (different criteria), let's say
there were 20 results. Now, the first 10 results, the DataKeys property
returns the ID from the *first* search. For the last 10, the results are
correct.
So it seems the DataKeys property is not getting updated with the new
results, even though a new DataBind is taking place. So all the "extra"
rows, have a new entry in the DataKeys property, and this is correct. But
the first X rows, where X is the number of rows in the first result set, do
not.
Can anyone shed any light on this?