jgd1234567
Programmer
Hi, i can't seem to use databinding syntax within the LayoutTemplate of the ListView control. I have tried:
<%# SomeProperty %>
but this does not work. In the past i was able to do this fine within the HeaderTemplate of a Repeater control. I modified the above to:
<%= SomeProperty %>
but this gave me the error "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).". What i could really do with is a solution to extend the ListView control so that i don't have to add any hacky code in the code behind. Appreciate if you could tell me how this could be fixed or if you have any suggestions.
Thanks
<%# SomeProperty %>
but this does not work. In the past i was able to do this fine within the HeaderTemplate of a Repeater control. I modified the above to:
<%= SomeProperty %>
but this gave me the error "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).". What i could really do with is a solution to extend the ListView control so that i don't have to add any hacky code in the code behind. Appreciate if you could tell me how this could be fixed or if you have any suggestions.
Thanks