Software Architecture – ASP .Net 4.0 -For data bound control – EnablePersistedSelection

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

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listview.enablepersistedselection.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: