Author: hubertoe | Posted on: 12/22/2009 10:19:06 PM | Views : 809

In an old VB.net web project, there was a checkbox written like the following :

<asp:CheckBox ID="chkCheck" Enabled ='<%# not(isSystemUser and databinder.eval(container.dataitem,"IsSystemRole")) %>' Runat="server" />


I was wondering, in my c# web project, I could not write it like the following above:

so I was wondering, is it possible to do the same as the above?
I managed to come up with : <asp:CheckBox ID="chkCheck" Enabled ='<%# (bool)(DataBinder.Eval(Container.DataItem, "IsSystemUser"))%>' runat="server" />

It works but when I tried to include 2 DataItems like the old VB.net project like :
<asp:CheckBox ID="chkCheck" Enabled ='<%# (bool)(DataBinder.Eval(Container.DataItem, "IsSys ...

Go to the complete details ...