Issue Referencing Nested DataList

Discussion in 'ASP .Net Web Controls' started by Jalal Akram, Apr 7, 2010.

  1. Jalal Akram

    Jalal Akram Guest

    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
    Jalal Akram, Apr 7, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nevyn Twyll
    Replies:
    8
    Views:
    1,846
  2. Luis Esteban Valencia

    Referencing two Datatables from a datalist

    Luis Esteban Valencia, Jan 11, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    411
    Luis Esteban Valencia
    Jan 11, 2005
  3. schapopa
    Replies:
    1
    Views:
    564
    schapopa
    Jan 12, 2006
  4. H5N1
    Replies:
    0
    Views:
    2,698
  5. Les Caudle
    Replies:
    0
    Views:
    1,970
    Les Caudle
    May 2, 2006
Loading...

Share This Page