FormView.DataKeyNames Property
Assembly: System.Web (in system.web.dll)
public: virtual property array<String^>^ DataKeyNames { array<String^>^ get (); void set (array<String^>^ value); }
/** @property */ public String[] get_DataKeyNames () /** @property */ public void set_DataKeyNames (String[] value)
public function get DataKeyNames () : String[] public function set DataKeyNames (value : String[])
Property Value
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. |
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note