我知道错误是由<%# Eval("NodeID")%>
语句引起的。当我输入一个文字整数时,它工作正常。我尝试将 WhereCondition 的外部双引号更改为单引号,将内部引号更改为双引号,但这会引发异常。
<cms:CMSRepeater ID="subcatPreviewImages" Path= '<%# Eval("NodeAliasPath") + "/%" %>' runat="server" ClassNames="CMS.MenuItem" TransformationName="EcommerceSite.Transformations.EMCategorySmallImagePreview" OrderBy="NodeLevel, NodeOrder, NodeName" MaxRelativeLevel="4" WhereCondition="DocumentMenuItemHideInNavigation='false' AND NodeParentID= <%# Eval("NodeID")%> AND NodeLevel=3" />