I have this commad that where id=333 how can I attach a string that will automatically put 333 with a sql query
string constr = ConfigurationManager.ConnectionStrings["PTS_Metcom"].ToString();
// SqlConnection cn = new SqlConnection(@"data source=DESKTOP-6DF0CN3\SQLEXPRESS; Database=EmployeeDatabase; integrated security = true");
SqlConnection cn = new SqlConnection(constr);
SqlCommand isim = new SqlCommand("select FIRMA_ADI from ARAC_SAHIPLERI where ID=333", cn);
SqlCommand kota = new SqlCommand("select AYNI_ANDA_KAPASITE from ARAC_SAHIPLERI where ID=333", cn);
SqlCommand iceride = new SqlCommand("select AYNI_ANDA_KAPASITE from ARAC_SAHIPLERI where ID=333", cn);
SqlCommand kalan = new SqlCommand("select AYNI_ANDA_KAPASITE from ARAC_SAHIPLERI where ID=333", cn);
cn.Open();
SqlDataReader rdr111 = isim.ExecuteReader();
while (rdr111.Read())
{
// Print employee details
ViewBag.isim = (rdr111[0]);
// Console.WriteLine(rdr[0]);
}
rdr111.Close();
SqlParameter