You will have to loop and insert in the following way
foreach (DataRow row in dt.Rows)
{
String strConnString = ConfigurationManager.ConnectionStrings["conString"].ConnectionString;
SqlConnection con = new SqlConnection(strConnString);
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "insert into persons(FirstName, LastName) values(@FirstName, @LastName)";
cmd.Parameters.Add("@FirstName", SqlDbType.VarChar).Value = row["FirstName"];
cmd.Parameters.Add("@LastName", SqlDbType.VarChar).Value = row["LastName"];
cmd.Connection = con;
try
{
con.Open();
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
throw ex;
}
finally
{
con.Close();
con.Dispose();
}
}