I need to count No.of unchecked Checkbox in a gridview using Linq. Here I have pasted the count for Checked one. I need Count of Unchecked
int totalCount = GridView1.Rows.Cast<GridViewRow>() .Count(r => ((CheckBox)r.FindControl("chkSelect")).Checked); // maybe: if(totalCount > 0) UpdateProduct(totalCount);