S
saqsaqPK
Guest
Kindly Advise us .
my Combo Box control not working
CombRegin.SelectedValue
protected void btnCity_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SECODMSConnectionString"].ConnectionString);
string insertQuery = "insert into City (CityName,ReginID)" +
" values (@CityName,@Regin)";
SqlCommand com = new SqlCommand(insertQuery, conn);
com.Parameters.AddWithValue("@CityName",txtCity.Text);
com.Parameters.AddWithValue("@Regin", CombRegin.SelectedValue);
com.ExecuteNonQuery();
Response.Write("Customer Name And Adress Add Successfully ");
Response.Redirect(Request.Url.AbsoluteUri);
conn.Close();
Continue reading...
my Combo Box control not working
CombRegin.SelectedValue
protected void btnCity_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SECODMSConnectionString"].ConnectionString);
string insertQuery = "insert into City (CityName,ReginID)" +
" values (@CityName,@Regin)";
SqlCommand com = new SqlCommand(insertQuery, conn);
com.Parameters.AddWithValue("@CityName",txtCity.Text);
com.Parameters.AddWithValue("@Regin", CombRegin.SelectedValue);
com.ExecuteNonQuery();
Response.Write("Customer Name And Adress Add Successfully ");
Response.Redirect(Request.Url.AbsoluteUri);
conn.Close();
Continue reading...