URGENT help needed. Trying to get panels to work...

Discussion in 'ASP .Net' started by TN Bella, Jun 16, 2004.

  1. TN Bella

    TN Bella Guest

    I downsized my code below...my text boxes work out okay with this
    format, it is just the dropdownboxes that give me an error. I need this
    to work so I can press on with other pressing things...thanks for the
    help! Right now I am so far behind.

    Compiler Error Message: BC30456: 'text' is not a member of
    'System.Web.UI.WebControls.DropDownList'.
    Line 29: litResponse.text+="<b>Invoice Location</b>:" &
    txtInvLoc.text & "<br>"

    Sub doInsert(Source as Object, E as EventArgs)
    pnl2.visible="true"
    litResponse.text+="<b><i>The information provided is now being
    processed</b>.<p>"
    litResponse.text+="<b>Invoice Location</b>:" & txtInvLoc.text &
    "<br>"
    End Sub

    <td>
    Invoice
    Location&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:dropdownlist id="txtInvLoc"
    runat="server" Width="200px">
    <asp:ListItem
    Value="001">001</asp:ListItem>
    <asp:ListItem
    Value="002">002</asp:ListItem>
    <asp:ListItem
    Value="003">003</asp:ListItem>
    </asp:dropdownlist>
    <br />
    </td>


    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
    TN Bella, Jun 16, 2004
    #1
    1. Advertising

  2. TN Bella

    GSK Guest

    You can't get the selected drop-down text or value this way. Try
    txtInvLoc.SelectedValue, or txtInvLoc.SelectedItem.Text.

    - gsk.

    "TN Bella" <> wrote in message
    news:eBsVuN%...
    > I downsized my code below...my text boxes work out okay with this
    > format, it is just the dropdownboxes that give me an error. I need this
    > to work so I can press on with other pressing things...thanks for the
    > help! Right now I am so far behind.
    >
    > Compiler Error Message: BC30456: 'text' is not a member of
    > 'System.Web.UI.WebControls.DropDownList'.
    > Line 29: litResponse.text+="<b>Invoice Location</b>:" &
    > txtInvLoc.text & "<br>"
    >
    > Sub doInsert(Source as Object, E as EventArgs)
    > pnl2.visible="true"
    > litResponse.text+="<b><i>The information provided is now being
    > processed</b>.<p>"
    > litResponse.text+="<b>Invoice Location</b>:" & txtInvLoc.text &
    > "<br>"
    > End Sub
    >
    > <td>
    > Invoice
    > Location&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    > <asp:dropdownlist id="txtInvLoc"
    > runat="server" Width="200px">
    > <asp:ListItem
    > Value="001">001</asp:ListItem>
    > <asp:ListItem
    > Value="002">002</asp:ListItem>
    > <asp:ListItem
    > Value="003">003</asp:ListItem>
    > </asp:dropdownlist>
    > <br />
    > </td>
    >
    >
    > *** Sent via Devdex http://www.devdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    GSK, Jun 17, 2004
    #2
    1. Advertising

  3. TN Bella

    TN Bella Guest

    Thanks for the reply. Since I am using 1.0 .net framework I had to set
    it up like this:

    litResponse.text+="<b>Invoice Location</b>:" &
    txtInvLoc.Items(txtInvLoc.SelectedIndex).Value & "<br>"

    Have a great day!



    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
    TN Bella, Jun 17, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chad A. Beckner
    Replies:
    2
    Views:
    565
    Chad A. Beckner
    Jun 18, 2004
  2. =?Utf-8?B?U2hhdXJ5YSBBbmFuZA==?=

    Help with panels..!!

    =?Utf-8?B?U2hhdXJ5YSBBbmFuZA==?=, Aug 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    382
  3. Sunshine

    Ascx and panels - Help

    Sunshine, Apr 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    365
    Kevin Spencer
    Apr 25, 2006
  4. Replies:
    3
    Views:
    556
  5. Jensen Bredahl
    Replies:
    2
    Views:
    104
    Jensen Bredahl
    Jun 26, 2005
Loading...

Share This Page