I have this code, and I need the “it.MembershipOption.Id” value in the “where” clause to be the <%# Eval(“Id”) %> from ListViewEventsOuter. I tried to add the Eval in the “where” clause but it throws an error.
How is this done?
<asp:ListView ID="ListViewEventsOuter" runat="server">
<ItemTemplate>
<a name='<%# Eval("Id") %>'></a>
<h3>Events for <%# Eval("Text")%> members</h3>
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
ConnectionString="name=Entities" Include="EventType, MembershipOption"
DefaultContainerName="Entities" EntitySetName="Events"
EntityTypeFilter="" Select="" Where='it.Active == True && it.MembershipOption.Id == [THIS VALUE TO COME FROM THE PREVIOUS ID IN LISTVIEW]'>
</asp:EntityDataSource>
<asp:ListView ID="ListViewEventsInner" runat="server">
ETC....
Solution: