Hi guys,
I'm using Javascript to dynamically add to a dropdown values like
for ( i=0; i<tv.length; i++ ) {
selectDDAvisCtr l.options[i] = new Option(tv[i], tv[i]);
}
and I use
document.getEle mentById("ddAvi s").options[document.getEle mentById('ddAvi s').selectedInd ex].innerHTML;
to access the value of the selected dropdown in Javascript...
now, How can I get the value using ASP.NET 2.0?
the dropdown tag is:
<asp:DropDownLi st ID="ddAvis" runat="server" CssClass="wizar dFormDD" />
I tried:
ddAvis.Selected Value
ddAvis.Text
ddAvis.SelectIn dex
ddAvis.SelectIt em
but none can get the selected value in the dropdown:
http://filterqueen.brinkster.net/new...sers/test.aspx
Please, fell free to change the DropDown with the values 1 to 4 and click
get ddAvis values so you can see that ASP.NET can retrieve the number with
no problems, but if you click the button add new numbers 2 DropDown, I'll
insert the number from 11 to 14 in the dropdownlist and you can navigate
with it, you can also see that I can event get that value in Javascript in
the function show() but if you click get ddAvis values you see that I can't
retrieve any correct number.
--
Bruno Alexandre
(a Portuguese in Københanv, Danmark)