How to get DropDownList selected value by selectedindexchanged event in

DropDownList selectedindexchanged get selected value
DropDownList is an list web server control that allow us to select a single item from a drop-down-list. the following c# example code demonstrate us how can we get dropdownlist selected item's value when users change selection in dropdownlist control.

if we set the dropdownlist control's AutoPostBack property value to True and write an event handler for SelectedIndexChanged event, we can get the users selected item value immediately when they make changes on dropdownlist item selection.

SelectedIndexChanged event is raised when the dropdownlist control item selection changes between posts to the server. AutoPostBack property get or set a value indicating whether a post back to the server automatically occurs when the user changes the dropdownlist item selection.

we can determine which item is currently selected in dropdownlist control using SelectedIndexChanged event's EventArgs object. by using this EventArgs object we can get the dropdownlist selected item's value.

<%@ Page Language="C#" AutoEventWireup="true"%>  
<!DOCTYPE html>
<script runat="server">
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        Label1.Text = "you selected....<br />";
        Label1.Text += "item: " + DropDownList1.SelectedItem.Text;
        Label1.Text += "<br />value: " + DropDownList1.SelectedItem.Value;
<html xmlns="">      
<head id="Head1" runat="server">      
    <title> dropdownlist selectedindexchanged get selected value</title>
    <form id="form1" runat="server">      
        <h2 style="color:MidnightBlue; font-style:italic;">      
   example - dropdownlist
            <br />selectedindexchanged get selected value
        <hr width="550" align="left" color="Gainsboro" />      
            Text="select an item from dropdownlist."
        <br /><br />
            <asp:ListItem Text="Canada Goose" Value="1"></asp:ListItem>
            <asp:ListItem Text="Cackling Goose" Value="2"></asp:ListItem>
            <asp:ListItem Text="Hawaiian Goose" Value="3"></asp:ListItem>
            <asp:ListItem Text="Black Swan" Value="4"></asp:ListItem>
            <asp:ListItem Text="Whooper Swan" Value="5"></asp:ListItem>
More examples