Enabled='<%# (bool)DataBinder.Eval(Container.DataItem,"gelation") ? false:true %>'
其中(bool)强制转换为布尔类型,如果是真返回false,如果为假返回true。在数据库中gelation为bit字段。其值为0或1,所以在这里要进行强制转换。
Enabled='<%# (bool)DataBinder.Eval(Container.DataItem,"gelation") ? false:true %>'
其中(bool)强制转换为布尔类型,如果是真返回false,如果为假返回true。在数据库中gelation为bit字段。其值为0或1,所以在这里要进行强制转换。