Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>HTML MARK UP </p> <pre><code>&lt;div&gt; &lt;asp:DataList ID="DataList1" runat="server" DataKeyField="bill_id" DataSourceID="SqlDataSource1" OnItemDataBound="loaditems"&gt; &lt;ItemTemplate&gt; bill_id: &lt;asp:Label ID="bill_idLabel" runat="server" Text='&lt;%# Eval("bill_id") %&gt;' /&gt; &lt;br /&gt; bill_date: &lt;asp:Label ID="bill_dateLabel" runat="server" Text='&lt;%# Eval("bill_date") %&gt;' /&gt; &lt;br /&gt; bill_del_date: &lt;asp:Label ID="bill_del_dateLabel" runat="server" Text='&lt;%# Eval("bill_del_date") %&gt;' /&gt; &lt;br /&gt; bill_pat_id: &lt;asp:Label ID="bill_pat_idLabel" runat="server" Text='&lt;%# Eval("bill_pat_id") %&gt;' /&gt; &lt;br /&gt; &lt;asp:DataList ID="DataList2" runat="server" DataKeyField="test_id"&gt; &lt;ItemTemplate&gt; test_id: &lt;asp:Label ID="test_idLabel" runat="server" Text='&lt;%# Eval("test_id") %&gt;' /&gt; &lt;br /&gt; &lt;br /&gt; &lt;/ItemTemplate&gt; &lt;/asp:DataList&gt; &lt;br /&gt; &lt;/ItemTemplate&gt; &lt;/asp:DataList&gt; &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="&lt;%$ ConnectionStrings:Diagnosticsql %&gt;" SelectCommand="SELECT * FROM [BILL]"&gt;&lt;/asp:SqlDataSource&gt; &lt;asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="&lt;%$ ConnectionStrings:Diagnosticsql %&gt;" SelectCommand="SELECT * FROM [TEST] WHERE ([test_bill_id] like @test_bill_id)"&gt; &lt;SelectParameters&gt; &lt;asp:Parameter Name="test_bill_id" Type="String" /&gt; &lt;/SelectParameters&gt; &lt;/asp:SqlDataSource&gt; &lt;/div&gt; </code></pre> <p>Code behind </p> <pre><code>Protected Sub loaditems(ByVal sender As Object, ByVal e As DataListItemEventArgs) Handles DataList1.ItemDataBound If (e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem) Then Dim billidlabel As Label = CType(e.Item.FindControl("bill_idLabel"), Label) Dim servicelist As DataList = CType(e.Item.FindControl("DataList2"), DataList) Me.SqlDataSource2.SelectParameters("test_bill_id").DefaultValue = billidlabel.Text servicelist.DataSourceID = SqlDataSource2.ID End If End Sub </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload