Link to home
Start Free TrialLog in
Avatar of UKIT
UKIT

asked on

Populate the Dataset or Data table once

I am selecting data from SQL  then I fill a data table with data then populate a grid view with data and would like to perform the select process only one time what happened is that every time I click on gridview page or a button the data gets populated again and the order of the data has changed.

C# ASP.net
ASKER CERTIFIED SOLUTION
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of FarWest
FarWest

As Mr. Paul said you should manage it in IsPostback, beside you should save the dataset in session and use it if it is a PostBack, or turn on  ViewState if you only want to keep data on Grid