I am trying to acheive this simple thing I have class dropdownlist that upon selection will fill another student dropdownlist, I am using jquery, below is my code
- $('#ddClass').on('change', function () {
- var ClassID = $('#ddlClass').val()
- $.ajax({
- url: 'StudentList',
- type: 'GET',
- contentType: 'apllication/html; charset=utf-8',
- data: { ID: ClassID},
- dataType: 'html',
- success: function (result) {
- $.each(result, function(index, row){
- $('#ddlStudent).append("
- }
- }
- })
Thank you!

Sachin SinghRank #66 · 26.2K reputationPosted Apr 16, 2021, 12:58 AM EDT
Schleid AlexRank #3,087 · 464 reputationPosted Apr 16, 2021, 8:27 AM EDT
Rijwan AnsariRank #82 · 24.2K reputationPosted Apr 17, 2021, 5:31 AM EDT