This is such a Google question...
It can be JavaScripted
protected void chkbSelectAll_CheckedChanged(object sender, EventArgs e)
{
bool chkFlag = false;
if (chkbSelectAll.Checked) chkFlag = true;
foreach (GridViewRow dr in gvProducts.Rows)
{
CheckBox chk = (CheckBox)dr.Cells[0].FindControl("Select");
chk.Checked = chkFlag;
}
}
Does this help