how use listview in

Total Post:21


 2785  View(s)
Rate this:
we use two listview as

<asp:ListView id="lv1">
<item template>
<asp:ListView id="lv2">...</asp:ListView>
</item template>

My problem ,how bind the both listview as given example
please give sample of this example
  1. Re: how use listview in

    Hello Yash,

    You can accomplish this task by initializing the DataSource of your second ListView.

    Here is the code for .aspx file

    <asp:ListView ID="lv1" runat="server" onitemdatabound="lv1_ItemDataBound">
    <asp:ListView ID="lv2" runat="server">                    
    . . . </asp:ListView> </ItemTemplate> </asp:ListView>

    Now, write code for DataSource of lv1 in Page_Load event and for lv2 in ItemDataBound of lv1. But remember to find lv2 in lv1 in order to point to lv2.

    Here is the code for finding lv2.

    ListView lv2 = e.Item.FindControl("lv2") as ListView;

    Now you can use DataBound Property of lv2;

    For further details refer to this forum post:

    Hope this will help you.

      Modified On Mar-29-2018 02:43:51 AM


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.