This documentation is archived and is not being maintained.

GridViewUpdateEventArgs::NewValues Property

Gets a dictionary containing the revised values of the non-key field name/value pairs in the row to update.

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

public:
property IOrderedDictionary^ NewValues {
	IOrderedDictionary^ get ();
}

Property Value

Type: System.Collections.Specialized::IOrderedDictionary
An System.Collections.Specialized::IOrderedDictionary object containing the revised values of the non-key field name/value pairs in the row to update.

Use the NewValues property (dictionary) to access the values of the revised non-key fields in the row to update.

NoteNote

The primary key field or fields are not included in this dictionary. To access the values of the primary key field or fields, use the Keys property. To access the original values of the non-key fields in the row, use the OldValues property.

The NewValues property is automatically populated with the name/value pairs of the revised non-key fields in the row. A separate entry is added to the NewValues property for each non-key field in the row.

To determine the field name of an entry, use the DictionaryEntry::Key property of a System.Collections::DictionaryEntry object contained in the NewValues dictionary. To determine the value of an entry, use the DictionaryEntry::Value property.

The following example demonstrates how to use the NewValues property to HTML-encode all values supplied by the user before updating the data source.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, 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.
Show: