DataList.SelectedValue Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the value of the key field for the selected data list item.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public object SelectedValue { get; }

Property Value

Type: System.Object

The key field value for the selected data list item. The default is null, which indicates that no data list item is currently selected.

Exception Condition

The DataKeyField property has not been set.

.NET Framework
Available since 2.0
Return to top