Bewerken

Share via


ListControl.Text Property

Definition

Gets or sets the SelectedValue property of the ListControl control.

public:
 virtual property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(false)]
[System.Web.UI.Themeable(false)]
public virtual string Text { get; set; }
[<System.ComponentModel.Browsable(false)>]
[<System.Web.UI.Themeable(false)>]
member this.Text : string with get, set
Public Overridable Property Text As String

Property Value

The SelectedValue of the ListControl.

Implements

Attributes

Remarks

The Text property gets and sets the same value that the SelectedValue property does.

The SelectedValue property is commonly used to determine the value of the selected item in the ListControl control. If no item is selected, an empty string ("") is returned.

You can also use the SelectedValue property to select an item in the ListControl control by setting it with the value of the item. If no items in the ListControl control contain the specified value, an System.ArgumentOutOfRangeException exception is thrown.

Control developers can override the SelectedValue property to support features that are not related to the SelectedValue property.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

Applies to

See also