Hello Friend's,
step 1: I trying textbox data 1st insert in grid. it's clear
but
step 2 : Grid data not insert in data base. it's code here
protected void btnsavedata_Click(object sender, EventArgs e)
{
foreach (GridViewRow g1 in gvloan.Rows)
{
SqlConnection con = new SqlConnection(conString);
SqlCommand com = new SqlCommand("insert into dbo.Test_db(Pf,loan) values ('" + g1.Cells[0].Text + "','" + g1.Cells[1].Text + "')", con);
con.Open();
com.ExecuteNonQuery();
con.Close();
}
}