I want to use asp.net webforms model binding and nest a listview in a listview. Is this possible?
Currently I have set DataKeyNames on the parent and use the [Control] attribute in the SelectMethod and the method gets called for every row int the parent but the parameter is null.
Any help is appriciated.
<asp:ListView ID="Topics" runat="server"
ItemType="Topic"
SelectMethod="Topics_GetData"
DataKeyNames="ID" >
<EmptyDataTemplate>
<div class="notice">
There are no Questions.
</div>
</EmptyDataTemplate>
<ItemTemplate>
<div><%# Item.TopicName %></div>
<asp:ListView ID="QuestionSetListView" runat="server"
ItemType="Question"
SelectMethod="QuestionListView_GetData"
DataKeyNames="ID">
<EmptyDataTemplate>
<div class="notice">
There are no Questions.
</div>
</EmptyDataTemplate> ...
The select method :
QuestionListView_GetData([Control("Topics")] int? ID)
Any thoughts?
Thanks