Unable to access the checkbox for Serverside coding
<p>Below is my gridview , </p>

<pre><code>&lt;asp:GridView ID="gridview1" AutoGenerateColumns="False" runat="server" 
         EnableModelValidation="True" &gt;
      &lt;Columns&gt;
      &lt;asp:CommandField ButtonType="Link" HeaderText="Delete"  InsertImageUrl="~/_layouts/images/TBS.WebParts/Button-Delete-icon.png" ShowDeleteButton="true"/&gt;
&lt;asp:BoundField HeaderText ="Size" DataField="FileSize" /&gt;
&lt;asp:BoundField HeaderText ="File" DataField="Size" /&gt;
&lt;asp:TemplateField HeaderText="SupportIncluded"&gt;
&lt;ItemTemplate&gt;
&lt;asp:CheckBox ID="Checkbox1" runat="server" Checked="false" /&gt;
&lt;/ItemTemplate&gt;
</code></pre>

<p><br>
 
     </p>

<p>Now on server side i want to check if the checkbox is checked or not on Submit button click event.</p>

<pre><code> private void btnSubmit_Click(object sender, EventArgs e)
    {
        if (IsValidPost())
        {
            bool flag = false;
            for( int i=0; i &lt; gridview1.Rows.Count ; i++)
            {
                if(dgdUpload.Rows[i].FindControl("Checkbox1"),CheckBox).Checked) erorr here...I also tried ....if(Checkbox1.checked)...but unable to access Checkbox1..it says it does not exist in the current context....


                flag = true;
            }
            if(flag)
            {
            }
        }
    }
</code></pre>
