How to store new records in new row of a datatable while retaining old values?

May 23 2010 10:53 AM
I have Desktop.aspx page with Gridview1 and  Detailsview1 controls. My requirement is, if I click on a button in Detailsview1, that particular product name and it's price should be stored in a datatable which is bound to GridView2. So far, I am successful in accomplishing this. However, if I click on another product , a new row is inserted in Datatable, but it shows the first added record and not the recent one. I have stored datatable object in session. My source code is as follows:

Answers (1)