Hi,
ive created a custom page type that has several long text fields. These page types are displayed in a repeater with the following transformation, which changes the style of the first item to make it "featured".
<% if (DataItemIndex ==0) { %> show a featured item <% } else { %> show a regular item <% } %> <% if (!string.IsNullOrEmpty(Eval("EventDate").ToString()) && !string.IsNullOrEmpty(Eval("EventLocation").ToString())) { %> format dates one way <% } else { %> format dates another way <% } %>
When a user adds a widget to one of these text fields the page bombs out with the error "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)." Is there any way to get over this error?
scratch that, got around it be specifying a first item transformation instead
Please, sign in to be able to submit a new answer.