Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Databinding Syntax Not Working in ListView LayoutTemplate

Status
Not open for further replies.

jgd1234567

Programmer
May 2, 2007
68
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top