Get Asp.net Drop Down List Select Value with JQuery

<asp:DropDownList runat="server" ID="DDLTest">
    <asp:ListItem Text="Item1" Value="11"></asp:ListItem>
    <asp:ListItem Text="Item2" Value="22"></asp:ListItem>
    <asp:ListItem Text="Item3" Value="33"></asp:ListItem>
</asp:DropDownList>
<script type="text/javascript">
    $(document).ready(function () {
        $('#<%=DDLTest.ClientID %>').change(function () {
            var myControl = $('#<%=DDLTest.ClientID %>').val();
            alert(myControl);
         })
     });
</script>

 

Author: Travis Gneiting

Passionate Professional .NET Developer