I have the code as,
<asp:ListItem Value="Above 50" Text="Above 50" Enabled='<%# (((string)(Eval("Gender"))).Contains("Male"))? true:false%>'></asp:ListItem>
the condition is,if the user is male,then the item 'Above 50' should enable in the dropdownList,else not. here, 'Gender' is nothing but a bound field.
the error showing is,
Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.ListItem does not have a DataBinding event.
what is wrong in the code?