dropdown List not working

  • Thread starter Thread starter saqsaqPK
  • Start date Start date
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...
 
Back
Top