System.Web.UI.WebControls Namespace ListItem Class
Initializes a new instance of the ListItem class with the specified text and value data.
[ VB ]
Overloads Public Sub New ( _
ByVal text As String, _
ByVal value As String _
)
[ C# ]
public ListItem (
string text,
string value
);
[ C++ ]
public: ListItem (
String* text,
String* value
);
[ JScript ]
public function ListItem (
text : String,
value : String
);
- text
- The text to display for the ListItem.
- value
- The value associated with the ListItem.
Use this constructor to initialize a new instance of the ListItem class using the specified text and value.
The following table shows initial property values for an instance of ListItem.
Property |
Initial Value |
Text |
The value of the text parameter. |
Value |
The value of the value parameter. |
ListItem Members ListItem Constructor Overload List