Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Keys Property
Collapse the table of content
Expand the table of content

ListViewDeleteEventArgs.Keys Property

Gets a dictionary of field name/value pairs that represent the primary key or keys of the item to delete.

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

public IOrderedDictionary Keys { get; }

Property Value

Type: System.Collections.Specialized.IOrderedDictionary
An object that contains the name/value pairs that represent the primary key or keys of the item to delete.

When the DataKeyNames property of a ListView control is set, use the Keys property to access the value of the primary key or keys in the item to delete.

NoteNote

This property contains only the key fields. To access the values of the non-key fields, use the Values property.

The Keys dictionary is automatically populated with the name/value pairs of the field or fields that are specified in the DataKeyNames property. If the primary key contains multiple fields, a separate entry is added to the Keys dictionary for each key field.

To determine the name of a key field, use the DictionaryEntry.Key property of a DictionaryEntry object that is contained in the Keys dictionary. To determine the value of a key field, use the DictionaryEntry.Value property.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5
Show:
© 2015 Microsoft