Nested ListView lazy-loaded

K

Kodiak

I have a nested listview that I want to lazy-load using the
ImageButton Click event. Once the ImageButton is clicked I want to
find the nested listview and databind to it. I know I can use the
ItemDataBound event of the parent listview, but I need to use the
ImageButton to load the nested listview. I am not sure how to do it
and any help is appreciated!

<asp:listview id="datesListView" runat="server"
onpagepropertieschanging="obitPropertiesChanging">
</layouttemplate>
<itemtemplate>
<h2>Obituaries for <%#Eval ("obitDate") %></h2>
<asp:IimageButton ID="imgButton" runat="server"
OnClick="imgButton_Click" Text="Load Child ListView"/>
<asp:listview id="obituariesListView" runat="server">
<layouttemplate>
<dl id="obituaries">
<asp:placeholder id="itemPlaceholder"
runat="server" />
</dl>
</layouttemplate>
<itemtemplate>
<dt><%#Eval("nameOfDeceased") %></dt>
<dd><%#Eval("age") %></dd>
<dd><%#Eval("cityOfResidence") %></dd>
</itemtemplate>
<alternatingitemtemplate>
<dt><%#Eval("nameOfDeceased") %></dt>
<dd><%#Eval("age") %></dd>
<dd><%#Eval("cityOfResidence") %></dd>
</alternatingitemtemplate>
<emptydatatemplate>
<p>There are no obituaries for today.</p>
</emptydatatemplate>
</asp:listview>
</itemtemplate>
</asp:listview>
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top