For that see the following code
Controllers ->
public JsonResult GetStudents(int id)
{
var states = db.Students.Where(x => x.courseID == id).ToList();
return Json(states, JsonRequestBehavior.AllowGet);
}
Views -> Jquery
$("#ddlCourse").change(function () {
var url = "/Controls_/GetStudents";
var courseID = $("#ddlCourse").val();
$.post(url, { id: courseID }, function (data) {
$("#ddlStudent").empty();
var items = "<option>Select Student<option>";
$.each(data, function (i, st) {
items += "<option value=" + st.ID + ">" + st.StudentName + "</option>";
});
$("#ddlStudent").html(items);
});
});