I just want to return a name through C# Enum GetName by passing int value from jquery.How can I do this?I've tried following code.
success: function (data) {
$("#CourseStatics").empty();
$.each(data, function (i) {
var optionhtml = '<tr><td>' + data[i].CourseCode + '</td> <td>'
+ data[i].CourseName + '</td><td>'
+ @Enum.GetName(typeof(AllEnums.Semester), data[i].SemesterId) + '</td><td>'
+ data[i].TeacherName + '</td></tr>';
$("#CourseStatics").append(optionhtml);
});
}