Dimitry Selected index is ASP.NET Property in Html you should do
document.getElementById("ddlMyField").value = "0"
Assuming you have an option in the combo where the value is set to 0.
>I am trying to set the SelectedIndex property of a dropdownlist to a number (e.g. 0). Here is how I do it in js:
>
>
>document.getElementById("ddlMyField").SelectedIndex = 0;
>
>
>but the above does not produce any results.
>
>Can you see what I am doing wrong?
>
>Thank you.
Alexandre Palma
Senior Application Architect