Databinding expressions are only supported on objects that have a DataBinding event

Discussion in 'ASP .Net' started by jobs, Sep 26, 2007.

  1. jobs

    jobs Guest

    I have this function that checks the current status of checkbox. It
    works great on almost all my controls. I use to determine if I will
    make certain textboxes and labels visible.

    However, when I attempt to use it to disable certain items in a
    dropdownlist, I get this error:

    Parser Error Message: Databinding expressions are only supported on
    objects that have a DataBinding event.
    System.Web.UI.WebControls.ListItem does not have a DataBinding event.


    I'm trying to use it as follows:

    <asp:ListItem Selected="True" Value="">None</asp:ListItem>
    <asp:ListItem Value="RT-BUYNOW"
    >BUY NOW $3.50 MORE MINUTES</asp:ListItem>

    <asp:ListItem Value="RT-RECHARGE" Enabled='<%# CashorCredit()%>'>$20
    OFF NEXT RECHARGE</asp:ListItem>
    </asp:DropDownList><br />




    It's works when I use here:

    <asp:TextBox ID="cityTextBox" maxlength="20" Visible='<%#
    CashorCredit()%>' runat="server" SkinID="Retailer"
    Text='<%# Bind("city") %>' Width="149px" />
    <br>

    Thanks for any help or information.
     
    jobs, Sep 26, 2007
    #1
    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. Jay Douglas
    Replies:
    0
    Views:
    619
    Jay Douglas
    Aug 15, 2003
  2. ABC
    Replies:
    7
    Views:
    707
    Luke Dalessandro
    Jan 13, 2006
  3. Mufasa
    Replies:
    0
    Views:
    372
    Mufasa
    Dec 2, 2007
  4. John H
    Replies:
    0
    Views:
    282
    John H
    Jun 24, 2009
  5. Noman Shapiro
    Replies:
    0
    Views:
    240
    Noman Shapiro
    Jul 17, 2013
Loading...

Share This Page