protected void Button1_Click(object sender, EventArgs e) { objBEL = new stuwork(); objDAL = new ClassDAL(); foreach (GridViewRow row in GridView1.Rows) { if (row.RowType == DataControlRowType.DataRow) { TextBox txtrow = (row.Cells[0].FindControl("TextBox1") as TextBox); DropDownList droprow = (row.Cells[0].FindControl("DropDownList1") as DropDownList); objBEL.fbCate = droprow.SelectedValue; Label name = (row.Cells[0].FindControl("Label1") as Label); Label teacher = (row.Cells[0].FindControl("Label2") as Label); objBEL.name = teacher.Text; objBEL.emailId = name.Text; objBEL.remark = txtrow.Text; Label1.Text = objDAL.AddFeedback(objBEL); } } }