Student attendance form data unable to stored in database tables

I created a attendance system in asp.net,
there are A to Z alphabet, when teacher click on A alphabet then student name start with A alphbet will show, then teacher can click or select student name then selected student name appeared in Attendees box. after that i submit the Attendees list but data is not stored in database table. data seen in console but not in db tables.

type here
aspx front end
<span class="alphabates" onclick="filterNames('A')">A</span>
<span class="alphabates" onclick="filterNames('B')">B</span>

<asp:Button ID="btn_saveAttendance" runat="server" class="btn btn-primary btn-rounded" Text="Save Attendance" OnClientClick="saveAttendance(); return false;" />

js
 const studentsSet = new Set();

    document.addEventListener('DOMContentLoaded', function () {
        fetchStudents();
    });

    function fetchStudents(letter = '') {
        var xhr = new XMLHttpRequest();
        var url = letter ? 'StudentAttendacePage.aspx/GetStudentsByLetterJson' : 'StudentAttendacePage.aspx/GetAllStudentsJson';
        xhr.open('POST', url, true);
        xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
        xhr.setRequestHeader('Accept', 'application/json; charset=utf-8');
        xhr.onreadystatechange = function () {
            if (xhr.readyState === 4) {
                if (xhr.status === 200) {
                    var response = JSON.parse(xhr.responseText);
                    var students = JSON.parse(response.d);
                    displayStudents(students);
                } else {
                    console.error('Error fetching students:', xhr.statusText);
                }
            }
        };
        xhr.send(JSON.stringify({ letter: letter }));
    }

    function displayStudents(students) {
        const namesList = document.querySelector('.attendancename .names');
        namesList.innerHTML = '';

        students.forEach(name => {
            const li = document.createElement('li');
            li.textContent = name;
            li.onclick = () => addToAttendees(name);
            namesList.appendChild(li);
        });
    }

    function addToAttendees(name) {
        if (!studentsSet.has(name)) {
            studentsSet.add(name);
            const attendeesList = document.querySelector('.attendeeslist');
            const div = document.createElement('div');
            div.textContent = name;

            const removeButton = document.createElement('button');
            removeButton.textContent = 'Remove';
            removeButton.onclick = () => removeFromAttendees(div, name);
            div.appendChild(removeButton);

            attendeesList.appendChild(div);
        }
    }

    function removeFromAttendees(element, name) {
        element.remove();
        studentsSet.delete(name);
    }

    function filterNames(letter) {
        fetchStudents(letter);
    }

    function saveAttendance() {
        const studentIds = Array.from(studentsSet); // Ensure IDs are integers
        const isLate = false; // Adjust based on your actual logic

        const xhr = new XMLHttpRequest();
        xhr.open('POST', 'http://localhost:55042/attendance/StudentAttendacePage.aspx/SaveAttendance', true);
        xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
        xhr.setRequestHeader('Accept', 'application/json; charset=utf-8');

        xhr.onreadystatechange = function () {
            if (xhr.readyState === 4) {
                if (xhr.status === 200) {
                    const response = JSON.parse(xhr.responseText);
                    alert(response.d); // Assuming response.d contains the success message
                } else {
                    console.error('Error saving attendance:', xhr.statusText);
                    alert('Error saving attendance. Check the console for details.');
                }
            }
        };

        const data = JSON.stringify({ studentIds, isLate });
        console.log('Sending data:', data); // Log data for debugging
        xhr.send(data);
    }



aspx.cs for db entry
[WebMethod]
    public static void SaveAttendance(List<string> attendeeIDs, int sessionID, int? specialSessionID, DateTime date)
    {
        string connectionString = "Server=IN-03;Database=ats;Integrated Security=True;MultipleActiveResultSets=True";

        try
        {
            using (SqlConnection cn = new SqlConnection(connectionString))
            {
                cn.Open();

                foreach (string studentName in attendeeIDs)
                {
                    int? studentID = GetStudentID(studentName, cn);

                    if (studentID.HasValue)
                    {
                        // Insert attendance record
                        string insertQuery = "INSERT INTO AttendanceRecord (Date, SessionID, SpecialSessionsID, StudentID, Late) VALUES (@Date, @SessionID, @SpecialSessionsID, @StudentID, @Late)";

                        using (SqlCommand cmdInsert = new SqlCommand(insertQuery, cn))
                        {
                            cmdInsert.Parameters.AddWithValue("@Date", date);
                            cmdInsert.Parameters.AddWithValue("@SessionID", sessionID);
                            cmdInsert.Parameters.AddWithValue("@SpecialSessionsID", (object)specialSessionID ?? DBNull.Value);
                            cmdInsert.Parameters.AddWithValue("@StudentID", studentID.Value);
                            cmdInsert.Parameters.AddWithValue("@Late", false);

                            cmdInsert.ExecuteNonQuery();
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            // Log the exception or handle it as needed
            throw new Exception("An error occurred while saving attendees.", ex);
        }
    }

i tried the javascript json to send, stored data,
i am expecting solution, like which code or things i missed in the code.
front end
console log

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật