Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
StoreOriginalValuesInViewState Property

EntityDataSource.StoreOriginalValuesInViewState Property

Gets or sets a value that indicates whether the data from the data source should be stored in view state to make sure that the data has not been changed by another process before it is updated or deleted.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web.Entity (in System.Web.Entity.dll)

Public Property StoreOriginalValuesInViewState As Boolean
<asp:EntityDataSource StoreOriginalValuesInViewState="True|False" />

Property Value

Type: System.Boolean
true if the values will be stored in view state; otherwise, false. The default value is true.

To track changes when update and delete operations are enabled, the EntityDataSource control must store information about original values of loaded objects in the ControlState. Storing this required information in the view state will increase the page size. You can disable storing original values in the view state by setting the StoreOriginalValuesInViewState property to false. If you do this, the Entity Framework cannot track concurrency in updated objects. For more information, see Updating Data (EntityDataSource).

.NET Framework

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2015 Microsoft