While exploring ASP .Net 4.0,I discovered that Microsoft has introduced a new property in ASP .Net 4.0 for data bound control like GridView,ListView named as EnablePersistedSelection.
In Asp .Net versions before 4.0, if a row is selected in Gridview then the same row number on all pages was get selected automatically. This was because of row selection on basis on index value.
But with ASP .Net 4.0, data Key based row selection is also supported. So now by enabling data key based row selection (by making EnablePersistedSelection=”True”), if a row is selected on page 1, later you move to next page 2, and so no row is selected on page 2, on returning to page 1 again, old row is still selected.
Keep enjoying coding in ASP .Net 4.0
MSDN Reference:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.enablepersistedselection.aspx
Posted by shahzadsb