asp.net gridview
<p>I have a gridview which has bound fields and a template field for checkbox.I wrote a code for deletion of records as per checking checkboxes.My problem is </p>

<pre><code>HtmlInputCheckBox chk;
     foreach(GridViewRow dr in dgvdetails.Rows)
        {

            chk = (HtmlInputCheckBox)dr.FindControl("ch");
            chk.Checked = true;
            if (chk.Checked)///       **here checkbox is not checked even if I'm check it**
            {

                pl.id = int.Parse(chk.Value);
                bl.deletedgvdetails(pl);
              }
           }
</code></pre>
