I have a ASCX Transformation which basically produces a table of products. On this table I am using the CartItemSelector control to give the user the ability to Add to Cart.
The problem is some of the items returned may not be orderable based on a property on the document type. I can't seem to get a conditional IF Statement working in the transformation to show/hide the CartItemSelector control.
<% if(Convert.ToBoolean(Eval("lOrderable"))) { %>
<uc1:CartItemSelector
runat="server"
SKUID='<%# ValidationHelper.GetInteger(Eval("SKUID"), 0) %>'
SKUEnabled='<%# ValidationHelper.GetBoolean(Eval("SKUEnabled"), false) %>'
ShowUnitsTextBox="true"
/>
<% } %>
I know there are a lot of threads out there discussing this, but I have not come across a suitable solution yet for my specific problem.