I need to put a user control in the template of the repeater controls and reference data from the repeater data source.
I tried (ignore the second cast, which depends on the CMS platform used):
<%# ((EPiServer.Core.PageData)((RepeaterItem)Container.Parent.NamingContainer).DataItem)["PageName"]%>
But this throws the following error: Unable to pass an object of type "ASP.usercontrols_searchcontrols_searchresult_ascx" to enter "System.Web.UI.WebControls.RepeaterItem"
Searchresult_ascx is another user control that contains the actual relay.
source
share