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

J

jobs

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:

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top