TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Schleid Alex
NA
361
48.2k
How to fill dependent dropdownlist with jquery
Apr 15 2021 7:35 PM
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("<option value = '
"+row.StudentID+
" '> "
+row.StudentName+"</option>
}
}
})
Please help me find out why it is not working.
Thank you!
Reply
Answers (
3
)
asp.net core filtering not working properly
Custom search to filter different records in asp.net mvc