FormView.SelectedValue Property
.NET Framework 3.0
Gets the data key value of the current record in a FormView control.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
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. |
Community Additions
ADD
Show:
Note: