Hi , i have one HTML select tag with run at server;
<select class="btn-group" id="ddlUserName" name="ddlUserName" runat="server" >
</select>
and i binded the values from code behind in page load.
if (!IsPostBack)
{
var users = bizUsers.GetUsers();
ddlUserName.DataTextField = "FirstName";
ddlUserName.DataValueField = "UserID";
ddlUserName.DataSource = users;
ddlUserName.DataBind();
ddlUserName.Items.Insert(0, "ALL");
}
now i want selected drop down value either with java script r JQuery. in seperate js file.
the value is giving undefined. when i am using
var showvalue = $('#ddlUserName').val();
Please help me how we can achieve this.