Prop Webcontrol Listitem Value
# ASP.NET ListItem Value Property
* * ListItem Control](#)
* * *
## Definition and Usage
The Value property is used to set or return the value of a ListItem control.
## Syntax
_
| Property | Description |
| --- | --- |
| string | A string value that specifies the value of the ListItem control. |
It is possible to set the text displayed for a list item by using either the Text or Value property, as well as the inner HTML text.
## Example
Text3
Depending on the combination of the Text or Value property and the inner HTML text, different text can be displayed and different values can be used. The following table lists all possible combinations and their values:
| Inner HTML | Text Property | Value Property | Displayed Text | Value Used |
| --- | --- | --- | --- | --- |
| Set | Set | Set | Inner HTML | Value Property |
| Set | Set | Not Set | Inner HTML | Inner HTML |
| Set | Not Set | Set | Inner HTML | Value Property |
| Set | Not Set | Not Set | Inner HTML | Inner HTML |
| Not Set | Set | Set | Text Property | Value Property |
| Not Set | Set | Not Set | Text Property | Text Property |
| Not Set | Not Set | Set | Value Property | Value Property |
| Not Set | Not Set | Not Set | Not Set | Not Set |
* * *
## Tips and Notes
**Note:** Since both the Text and Value properties have empty string default values, there might be empty list items in a list control.
* * *
## Example
The following example sets the value of a ListItem in a ListBox control:
[Demo Example Β»](#)
* * ListItem Control](#)
YouTip