Nested Query RepeaterI was using that as the basis for adding a nested query repeater to my news pages that would display a list of media contacts based on geographical region and associated/relevant business units.
This code:
<cms:queryrepeater StopProcessing="false" runat="server" ID="qrContacts" QueryName="custom.news.NewsMedia" TransformationName="custom.news.NewsContact" OrderBy="LastName ASC" />
<script runat="server">
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (this.Parent is IDataItemContainer)
{
IDataItemContainer cont = this.Parent as IDataItemContainer;
if (cont != null)
{
qrContacts.WhereCondition= "nodeAliasPath = '" + Eval("NodeAliasPath") + "'";
qrContacts.ReloadData(true);
}else
{
Response.Write("Error: IDataItemContainer is null");
}
}
}
</script>
Was added to the transformation that displays the news detail. The code in the
custom.news.NewsContact transformation is basic display:
<%# Eval('FirstName') %> <%# Eval('LastName') %><br />
<%# Eval('Company') %><br />
<%# Eval('Phone') %><br />
<a href="mailto:<%# Eval('Email') %>"><%# Eval('Email') %></a><br />
If I replace that code with text for testing purposes, it displays correctly, however whenever I have that code in place I get:
error CS1012: Too many characters in character literal
I have checked the query, it returns the correct data, and has been used on a normal, no nested repeater. The error is vague but it seems as if there is a disconnect when trying to load the data dynamically? Is there a setting I am missing? Anyone else ever experience this?
Thank you in advance.