protected void btnSubmit_Click(object sender, EventArgs e)
{
for (int i = 0; i < this.DataGrid1.Items.Count; i++)
{
for (int j = 0; j < DataGrid1.Items[i].Controls.Count; j++)
{
for (int k = 0; k < DataGrid1.Items[i].Controls[j].Controls.Count; k++)
{
Label la = null;
la = new Label();
la =(Label) DataGrid1.Items[i].Controls[j].Controls[k].FindControl("lblText");
}
SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);
con.Open();
SqlCommand cmd = new SqlCommand(sql,con);
cmd.ExecuteNonQuery();
}