mercredi 24 décembre 2014

javascript fill combobox with ajax but in C# selected value is null


I have some issue with filling a combobox with javascript.



var optn = document.createElement("OPTION");
optn.text = 'HOLA MUNDO';
optn.value = '2';
ComboBoxName.options.add(optn);


That is filled with ajax because its combo who are filled depending of another combo.


But in c# when i need to use



ComboBoxName.SelectedItem.Text


the SelectedItem is null


Somebody know about that? Thanks





Aucun commentaire:

Enregistrer un commentaire