Keeping Data in GridView after PostBack
问题 I have a GridView which is associated with an SqlDataSource . When I click a Button , I change the SelectCommand and then I use DataBind to update the GridView . After PostBack, I want the latest Data to Remain, I don't want the GridView to be loaded by the original SelectCommand . I know this is done by something called ViewState , but I didn't manage to implement it in the right way. I tried both EnableViewState="true" and EnableViewState="false" on the Grid itself, with no luck. Code <asp