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
Code
JavaScript
try
{
if (Session["Vechilevalue"] != null && !n.tbl_Vec.Any(x => x.Vec_ID == Vec_ID))
{
v.Vec_ID = Vec_ID;
{
v.Vec_ID = DropDownList1.SelectedValue;
}
n.tbl_Vec.Add(v).ToString();
n.SaveChanges();
}
else
{
}
Session["Vechilevalue"] = DropDownList1.SelectedValue;
}
catch
{
}any solution

Ramesh PalaniappanRank #370 · 6.8K reputationPosted Oct 24, 2016, 4:53 AM EDT