Selected value of a dropdown using jquery in asp.net mvc
To reteive the selected value of a dropdown using jquery in asp.net mvc
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Shailesh UkeRank #1,917 · 766 reputationPosted May 11, 2015, 9:26 PM EDT
You can use
var assign_to = $('#client_group_id').val();
client_group_id = dropdown list id
Jithil JohnRank #2,791 · 506 reputationPosted May 11, 2015, 9:34 PM EDT
@Html.DropDownList("Employee", Model.EmployeeList, "Select Employee")
Pranay RanaRank #735 · 3.2K reputationPosted May 11, 2015, 10:14 PM EDT
var selectedvalues = $("#Employee").val();//provide you selected employee id
as per you code Employee is id of the dropdownlist
Check jQuery documentation : http://api.jquery.com/val/