multiple queries in listview
<p>I want to use multiple queries in one list view.In my list view each column values have to be derived from more than two tables.So how cal I use multiple queries in the list view.</p>

<p>my asp.net code;</p>

<pre><code>     &lt;LayoutTemplate&gt;
                        &lt;table id="Table1" border="2" cellspacing="3" cellpadding="3" style="color: Black; border-bottom:1px solid black; border-right:1px solid black; border: thin solid #000000;" runat="server" &gt;
                            &lt;tr id="Tr1" runat="server"&gt;
                                &lt;td id="Td1" runat="server"&gt;Owned By &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;
                                &lt;td id="Td2" runat="server"&gt;Shared class &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;
                                &lt;td id="Td3" runat="server"&gt;Effective Interest &amp;nbsp;&amp;nbsp;&lt;/td&gt;
                                &lt;td id="Td4" runat="server"&gt;Deemed Interest &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;
                                &lt;td id="Td5" runat="server"&gt;Shares Owned &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;
                                &lt;td id="Td12" runat="server"&gt;Shares Issued &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;
                            &lt;/tr&gt;

                             &lt;tr style="border-style: 1; border-color: #FFFFFF!important; border-width: 1px; color: #FF0000;"&gt;
                            &lt;td&gt;&lt;%#Eval("owner_CompanyId")%&gt;&amp;nbsp;&lt;/td&gt;
                            &lt;td&gt;&lt;%#Eval("owner_sharetype")%&gt;&amp;nbsp;&lt;/td&gt;
                            &lt;td&gt;&lt;%#Eval("owner_effectinterest")%&gt;&amp;nbsp;&lt;/td&gt;   
                            &lt;td&gt;&lt;%#Eval("owner_effectinterest")%&gt;&amp;nbsp;&lt;/td&gt;                 
                            &lt;td&gt;&lt;%#Eval("owner_shares")%&gt;&amp;nbsp;&lt;/td&gt; 
                            &lt;/tr&gt;


                            &lt;tr id="ItemPlaceholder" runat="server"&gt;
                            &lt;/tr&gt;
                        &lt;/table&gt;
    &lt;table&gt;
    &lt;tr style="border-style: 1; border-color: #FFFFFF!important; border-width: 1px; color: #FF0000;"&gt;
here i want to use the data from another tables with different queries
                            &lt;td&gt;&lt;%#Eval("comp_CompanyId")%&gt;&amp;nbsp;&lt;/td&gt;
                            &lt;td&gt;&lt;%#Eval("ownercompanylog_sharetype")%&gt;&amp;nbsp;&lt;/td&gt;
                            &lt;td&gt;&lt;%#Eval("owner_effectinterest")%&gt;&amp;nbsp;&lt;/td&gt;   
                            &lt;td&gt;&lt;%#Eval("owner_effectinterest")%&gt;&amp;nbsp;&lt;/td&gt;                 
                            &lt;td&gt;&lt;%#Eval("owner_shares")%&gt;&amp;nbsp;&lt;/td&gt; 
                            &lt;/tr&gt;
    &lt;/table&gt;
                 &lt;/LayoutTemplate&gt;

        &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                 ConnectionString="&lt;%$ ConnectionStrings:DreamsConnectionString4 %&gt;" 

                 SelectCommand="SELECT [owner_CompanyId], [owner_childcompid], [owner_effectinterest], [owner_sharetype], [owner_shares] FROM [Owner] WHERE ([owner_CompanyId] = @owner_CompanyId)" 
                 OnSelecting="SqlDataSource1_Selecting" &gt;

                &lt;SelectParameters&gt;
                    &lt;asp:ControlParameter ControlID="HiddenField1" DefaultValue="18" 
                        Name="owner_CompanyId" PropertyName="Value" Type="Int32" /&gt;
                &lt;/SelectParameters&gt;
             &lt;/asp:SqlDataSource&gt;    
</code></pre>
