dropdown box question any idea's?

hi another simple on but i just can not get it to work,

this is my drop down box


<asp:dropDownList id="term" runat="server">
<asp:listitem >3 years (36)</asp:listitem>
<asp:listitem>Test</asp:listitem>
</asp:dropDownList>


probelm is it only works wen the real value is passed ie NOT 3 years (36) BUT      36

how can i display one thing in the box but actual send the value of of say 36

ie send 36 value but in the box it displays  3 years (36) like it is now. i have tried <asp:listitem vlalue="36" >3 years (36)</asp:listitem> but this just give a error like before.

any idea many thanks
LVL 12
pigmentartsAsked:
Who is Participating?
 
lengreenConnect With a Mentor Commented:
Hi pigmentarts,

then access the value term.selecteditem.value

Cheers!
0
 
TimCotteeCommented:
Hi pigmentarts,

        <asp:ListItem Value="36">3 Year(36)</asp:ListItem>

Should certainly work

Tim Cottee
0
 
pigmentartsAuthor Commented:
thanks again, worked like it should
0
All Courses

From novice to tech pro — start learning today.