Simple dropdown question anyone?

Posted on 2005-04-27
Last Modified: 2010-04-23
simple probelm,

have a calculator that worked when this line was like this  


<asp:TextBox id="term" runat="server"/>

but i now need a drop down not a txt box so i did this instead:


<asp:dropDownList id="term" runat="server">

i now get this error when before i did not have any i don't see whats wrong can anybody?

error ---------------------------------------------------------------------------------------

'Text' is not a member of 'System.Web.UI.WebControls.DropDownList'.

Line 9:  Dim d as Double = rate.Text
Line 10: Dim c as Double = amount.Text
Line 11: Dim n as Double = term.Text <---error on this line
Line 12: Dim p as Double
Line 13: Dim Cr as Double      

end of error -------------------------------------------------------------------------------

the name is the same nothing has changed is there something like term.DROPDOWN  that i should be using instead of text> as i have no idea.

many thanks if you can help

Question by:pigmentarts
    LVL 10

    Accepted Solution

    Hi pigmentarts,


    Dim n as Double = term.selectedItem.Text

    LVL 12

    Author Comment

    thanks very much i knew it was going to be somthing like that ur a star :)
    LVL 10

    Expert Comment


    no problem glad to help



    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now