FormView::DataKeyNames Property
.NET Framework (current version)
Gets or sets an array that contains the names of the key fields for the data source.
Assembly: System.Web (in System.Web.dll)
public: [TypeConverterAttribute((StringArrayConverter^::typeid))] property array<String^>^ DataKeyNames { virtual array<String^>^ get(); virtual void set(array<String^>^ value); }
Property Value
Type: array<System::String^>^An array that contains the names of the key fields for the data source.
Use the DataKeyNames property to specify a comma-separated list of field names that represent the primary key of the data source. When the DataKeyNames property is set, the FormView control automatically creates a DataKey object that contains the key/value pairs of the field or fields listed in the DataKeyNames property for the current record. The DataKey object is then stored in the DataKey property.
Note |
|---|
You must set the DataKeyNames property for the built-in updating, deleting, and inserting features of the FormView control to work. |
.NET Framework
Available since 2.0
Available since 2.0
Show:
