scropio gurl

scropio gurl

  • NA
  • 147
  • 99.2k

Only 1 dropdown value in insert

Oct 24 2016 8:26 AM

I have values in dropdown like thos

Mango

Orange

Grapes

I try to insert selected value from dropdown to table so when i select mango value is insered but when i select orange then mango is inserted where is i want to insert orange.. also when i select grapes always mango value is inserted this is waht i try


  1. try  
  2.          {  
  3.              if (Session["Vechilevalue"] != null && !n.tbl_Vec.Any(x => x.Vec_ID == Vec_ID))  
  4.              {  
  5.   
  6.                  v.Vec_ID = Vec_ID;  
  7.                  {  
  8.                      v.Vec_ID = DropDownList1.SelectedValue;  
  9.                  }  
  10.   
  11.                  n.tbl_Vec.Add(v).ToString();  
  12.                  n.SaveChanges();  
  13.                    
  14.              }  
  15.              else  
  16.              {  
  17.   
  18.   
  19.              }  
  20.              Session["Vechilevalue"] = DropDownList1.SelectedValue;  
  21.          } 
  22. catch
  23. {

any solution


Answers (1)