Here I'm attaching the code which much similar with your code,but main things is that it works in my application.
protected void Button2_Click(object sender, EventArgs e)
{
con.Open();
foreach(System.Data.DataRow D in dt.Rows)
{
DropDownList1.Items.Add(D[0].ToString());
}
foreach (GridViewRow G in GridView1.Rows)
{
string cmdstring = "INSERT INTO TempTable(ID,City) VALUES(" + G.Cells[0].Text + ",'" + G.Cells[1].Text + "')";
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(cmdstring, con);
cmd.ExecuteNonQuery();
}
con.Close();
}
check it if you still not found your output then tell me again.