I have one datagrid in which i am using templatecolumn and added a checkbox control.

onclick assigned a value to it by using javascript.

now onsubmit i want that value

What is the way to get that value???

what I am tried is which is not working:

private void Button1_Click(object sender, System.EventArgs e)
{
foreach( DataGridItem di in Grid1.Items )
{
if (((CheckBox) di.FindControl("chkBx")).Checked)
{
Label1.Text += ((CheckBox) di.FindControl("chkBx")).Text;

}
}
}