Issue Referencing Nested DataList

J

Jalal Akram

why doesn't it allows to refer DataList1 in code-behnd as in following

<asp:DataList ID="DataList1" runat="server" CellPadding="0"
CellSpacing="5"
RepeatColumns="3" RepeatDirection="Horizontal"
EnableViewState="False">
<ItemTemplate>
<asp:DataList ID="DataList2" runat="server">
<ItemTemplate>Stuff Here</ItemTemplate>
</asp:DataList>
<asp:LinkButton ID="LinkButton1"
runat="server">LinkButton</asp:LinkButton>
</ItemTemplate>
</asp:DataList>

shows error with following msg
the name 'DataList1' does not exist in the current context.

surprised.......how to have two nested DataLists as above and
bound them with a DataSet having two (paraent-child) tables, linked through
a DataRelation

Thinking you in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top