title: How to change a combobox Value when inserting in database?
body: <p>I have created a combobox with items.</p>
  
  <p>Visually in my form the items texts will apear, and i want to change the values to numbers when i insert in the database.</p>
  
  <p>example : </p>
  
  <pre><code>        private void contact(){
          TypeAdrCmBx.Items.Add("NPAI");
          TypeAdrCmBx.Items.Add("Personnelle");
          TypeAdrCmBx.Items.Add("Professionelle");
          TypeAdrCmBx.Items.Add("Vacances"); }
  </code></pre>
  
  <p>this is my insert Query :</p>
  
  <pre><code>                string Query2 = "INSERT INTO [dbo].[Adresses] ([Type] ,[Adresse0],[Adresse1],[Adresse2],[CPT],[Ville],[Pays]) VALUES ('" + this.TypeAdrCmBx.Text + "','" + this.AdrTxtBx0.Text + "','" + this.AdrTxtBx1.Text + "','" + this.AdrTxtBx2.Text + "','" + this.CptTxtBx.Text + "','" + this.VilleTxtBx.Text + "','" + this.PaysCmBx0.Text + "')";
  </code></pre>
  
  <p>in the database the combobox values are inserted as numbers :</p>
  
  <pre><code> "NPAI" = 1
   "Personnelle" = 2
   "Professionelle" = 3
   "Vacances" = 4
  </code></pre>