HI i have above html tag in my asp.net listview item template ,
-
try this:
Short and simple
Refrence
your check box
in code behind
protected void chkStudentStatus_CheckedChanged(object sender, EventArgs e)
{
var chk = (CheckBox)sender;
var studentID = chk.Attributes["CommandName"];
}
you can give any named attribute i.e. xyz='<%#Eval("StudentID")%>'
than
in code behind
protected void chkStudentStatus_CheckedChanged(object sender, EventArgs e)
{
var chk = (CheckBox)sender;
var studentID = chk.Attributes["xyz"];
}
- 热议问题