problem with DataBinder
I have the DataBinder.Eval in different place in my asp page but in one place it makes an error
'System.Web.UI.DataBinder' does not contain a definition for 'eval'
It work in this line
<asp:TemplateColumn HeaderText="Correz.">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:LinkButton ID="Linkbutton1" runat="server" CausesValidation="false" CommandName="IsVisible"
Text="<img src=images/IsVisible.gif border=0 alt='Fax correzione'>" Visible='<%#IsVisible(DataBinder.Eval(Container, "DataItem.FlgSta"),DataBinder.Eval(Container, "DataItem.FlgCon"))%>'>
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
But I got the error in this link in enabled!!
<asp:TemplateColumn HeaderText="Modif">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" CommandName="Modifica" Enabled='<%#IsEnabled(DataBinder.Eval(Container,"DataItem.FlgNote"),DataBinder.Eval(Container,"DataItem.FlgCon"))%>'
Text='<%#CheckLocked(DataBinder.eval(Container,"DataItem.Ididis"),DataBinder.eval(Container,"DataItem.Prodis")) %>'
Visible='<%#Visibile(DataBinder.Eval(Container, "DataItem.FlgNote"),DataBinder.Eval(Container, "DataItem.FlgCon"))%>'>
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
I can’t found why !!开发者_高级运维
In the below line, Eval is typed in Lower Case. it should be Eval
, not eval
. Remember C# is case Sensitive :)
Text='<%#CheckLocked(DataBinder.eval(Container,"DataItem.Ididis"),DataBinder.eval(Container,"DataItem.Prodis")) %>'
精彩评论