We generally use a GridView Control to Display Data and also Perform Paging, Sorting, Editing, Deleting records. In each of these we have postback on the page.
To avoid Postback during sorting and Paging, the following code can be used inside the GridView Control.
If you have created a GridView and Bind the GridView using data source control, you can avoid postback during sorting and paging by setting EnableSortingAndPagingCallbacks‘property of the GridView to True.
N:B: when you use the ‘EnableSortingAndPagingCallbacks’ property to true for avoid Postback, you cannot use Template Fields in the GridView.