I use javascript in asp.core. I have follow problem:
I have a list wich includes a ID and a Name. I display Name in dropdown list as follow:
$("#TypeList").ejDropDownList({
dataSource: dataManagerType,
fields: { value: "Name", text: "TypeId" },
enableFilterSearch: true,
enabled: true,
change: "GetSpecList",
validationRules: { required: true },
validationMessage: { required: 'is required.' },
});
What I want is to get selected value of dropdown list (Name).
I tried follow code:
alert(TypeList.value);
I get only the "ID" not the name. If I use TypeList.Text i get: "undefined"