ListControl.Text Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈