B
Bruno Alexandre
Hi guys,
I'm using Javascript to dynamically add to a dropdown values like
for ( i=0; i<tv.length; i++ ) {
selectDDAvisCtrl.options = new Option(tv, tv);
}
and I use
document.getElementById("ddAvis").options[document.getElementById('ddAvis').selectedIndex].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:
<aspropDownList ID="ddAvis" runat="server" CssClass="wizardFormDD" />
I tried:
ddAvis.SelectedValue
ddAvis.Text
ddAvis.SelectIndex
ddAvis.SelectItem
but none can get the selected value in the dropdown:
http://filterqueen.brinkster.net/new_fastcash.dk/users/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.
I'm using Javascript to dynamically add to a dropdown values like
for ( i=0; i<tv.length; i++ ) {
selectDDAvisCtrl.options = new Option(tv, tv);
}
and I use
document.getElementById("ddAvis").options[document.getElementById('ddAvis').selectedIndex].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:
<aspropDownList ID="ddAvis" runat="server" CssClass="wizardFormDD" />
I tried:
ddAvis.SelectedValue
ddAvis.Text
ddAvis.SelectIndex
ddAvis.SelectItem
but none can get the selected value in the dropdown:
http://filterqueen.brinkster.net/new_fastcash.dk/users/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.