how to get checkbox is checked when checkbox is in table rows
<asp:Table ID="mytbl" runat="server">
</asp:Table>
while (res.Read())
{
trow = new TableRow();
tcell1 = new TableCell();
tcell2 = new TableCell();
CheckBox ch = new CheckBox();
ch.CssClass = "chkBox";
ch.ID = res.GetInt32(1) + "_" + res.GetInt32(2);
//ch. = res.GetInt32(1) + "_" + res.GetInt32(2);
values.Add(res.GetInt32(1) + "_" + res.GetInt32(2));
tcell1.Controls.Add(ch);
tcell2.Text = res.GetString(0);
trow.Cells.Add(tcell1);
trow.Cells.Add(tcell2);
mytbl.Rows.Add(trow);
}
I want check checkbox is checked and save result in database
Aucun commentaire:
Enregistrer un commentaire