Le paramètre ASP ne passe pas à JavaScript

Voici mon code ASP

string studentid = dr["StudentId"].ToString(); string studentname = dr["studentName"].ToString(); Response.Write("<tr>"); Response.Write("<td id = 'sid' >"); Response.Write(studentid); Response.Write("</td>"); Response.Write("<td>"); Response.Write(studentname); Response.Write("</td>"); Response.Write(String.Format("<td id = '{0}' onclick = 'update({0})' >", studentid)); Response.Write("<img src = 'Edit-icon.png' height='20' width='20' >"); Response.Write("</td>"); Response.Write(String.Format("<td id = '{0}' onclick = 'deleteStudent({0})' >", studentid)); Response.Write("<img src = 'ic_delete_48px-128.png' height='20' width='20'>"); Response.Write("</td>"); Response.Write("</tr>"); } 

Chaque fois que je clique sur td id = "studentid", la fonction JavaScript est appelée mais le paramètre ne passe pas. Voici ma fonction JavaScript:

 function deleteStudent(x) { alert(x); var ajaxRequest = new XMLHttpRequest; ajaxRequest.open("GET", "crudops.aspx?StudentId=" + x +"&operation=delete", false); ajaxRequest.send(null); ... 

Ici, l'alerte (x) dit [objet HTMLCollection] Quel est le problème? Aidez-moi avec des suggestions.