System.Web.UI.WebControls.FormView.SelectedValue Property

Gets the data key value of the current record in a System.Web.UI.WebControls.FormView control.

Syntax

[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public object SelectedValue { get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the FormView.DataKeyNames property is set, the System.Web.UI.WebControls.FormView control automatically creates a System.Web.UI.WebControls.DataKey object that contains the key/value pairs of the field or fields listed in the FormView.DataKeyNames property for the current record. The System.Web.UI.WebControls.DataKey object represents the primary key field or fields for the current record and is stored in the FormView.DataKey property. Instead of using the FormView.DataKey property to access the data key value, you can use the FormView.SelectedValue property as a shortcut.

Note:

When the FormView.DataKeyNames property lists multiple fields, this property returns the value of the first field listed.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0