Reading ASP.NET drop down values using JQuery

ASP.NET Drop down values

From the below example, we can able to get the value from the drop down list select item using jquery.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="">
<head runat="server">
  <script type="text/javascript" src=""></script>
    <script type="text/javascript">
        $(document).ready(function () {

            $('#ddlTeste').change(function () {
                var txtLanguage = $('#txtLanguage');
                var testvalues = $("#ddlTeste option:selected").text();
                if (testvalues) {
    <form id="form1" runat="server">
    <asp:DropDownList ID="ddlTeste" runat="server" >
    <asp:ListItem Value=""></asp:ListItem>
    <asp:ListItem Value="2">value 1</asp:ListItem>
    <asp:ListItem Value="3">value 2</asp:ListItem>
    <asp:ListItem Value="4">value 3</asp:ListItem>
    <asp:ListItem Value="5">value 4</asp:ListItem>
        <asp:TextBox ID="txtLanguage" runat="server"></asp:TextBox>


Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar