Gets or sets an array that contains the names of the key fields for the data source.
Assembly: System.Web (in System.Web.dll)
[<TypeConverterAttribute(typeof(StringArrayConverter))>] abstract DataKeyNames : string with get, set [<TypeConverterAttribute(typeof(StringArrayConverter))>] override DataKeyNames : string with get, set
Property ValueType: System.String
An array that contains the names of the key fields of the data source.
Use the DetailsView control automatically creates a DataKey object that represents the key field or fields for the current record and stores it in the DataKey property. When the AutoGenerateColumns property is also set to true, the DetailsView control automatically ensures that the field or fields specified in the property are read-only.property to specify a comma-separated list of field names that represent the primary key of the data source. When the property is set, the
You must set the DetailsView control to work.property for the automatic updating, deleting, and inserting features of the
If the Visible property of a row field is set to false, the row is not displayed in the DetailsView control and the data for the row does not make a round trip to the client. If you want the data for a row that is not visible to make a round trip, add the field name to the property.
Available since 2.0