Asp Control ASP.Net


protected void Page_Load(object o, EventArgs e) {
    if(!IsPostBack) {
        ListItem item;
        item = new ListItem("C#", "1");
        languageDropDownList.Items.Add(item);
        item = new ListItem("VB.NET", "2");
        languageDropDownList.Items.Add(item);
        item = new ListItem("Java", "3");
        languageDropDownList.Items.Add(item);
        favoriteLanguage.Text = languageDropDownList.SelectedItem.Value;
    }
}
protected void DropDownListSelectionChanged(object o, EventArgs e) {
    favoriteLanguage.Text = languageDropDownList.SelectedItem.Value;
}


    id="languageDropDownList"
    runat="server" 
    OnSelectedIndexChanged="DropDownListSelectionChanged" >

Favorite Language: