FormView::SelectedValue Property
.NET Framework (current version)
Gets the data key value of the current record in a FormView control.
Assembly: System.Web (in System.Web.dll)
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 represents the primary key field or fields for the current record and is stored in the DataKey property. Instead of using the DataKey property to access the data key value, you can use the SelectedValue property as a shortcut.
Note |
|---|
When the DataKeyNames property lists multiple fields, this property returns the value of the first field listed. |
.NET Framework
Available since 2.0
Available since 2.0
Show:
