SelectListItem.Value Property

Gets or sets the value of the HTML value attribute of the HTML option element that is associated with the SelectListItem instance.

Namespace:  System.Web.WebPages.Html
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public Property Value As String 
    Get 
    Set
'Usage
Dim instance As SelectListItem 
Dim value As String 

value = instance.Value

instance.Value = value
public string Value { get; set; }
public:
property String^ Value {
    String^ get ();
    void set (String^ value);
}
member Value : string with get, set
function get Value () : String 
function set Value (value : String)

Property Value

Type: System.String
The value of the HTML value attribute that is associated with the select list item.

Remarks

The value attribute of an HTML option element in an HTML select list lets you identify list items by a unique string value instead of by an index in the list.

See Also

Reference

SelectListItem Class

System.Web.WebPages.Html Namespace