我對c#很新。 我有一個頁面,需要多個記錄集和一個返回它們的sproc。我正在爲主記錄集使用中繼器控件。我如何到達下一個返回的記錄集?存儲過程返回多個記錄集
好的,所以數據源是在aspx頁面。我會把它移到頁面後面的代碼來使用NextResult吧?這是我的代碼現在。如何將數據源移動到代碼隱藏,實現數據讀取器,以便我可以使用nextresult?
<asp:SqlDataSource ID="AssetMgtSearch" runat="server"
ConnectionString="<%$ ConnectionStrings:OperationConnectionString %>"
SelectCommand="spAssetMgtItemList" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
<div class="contentListFullHeight">
<table cellspacing="0" cellpadding="0" border="0" class="contentList">
<tr>
<th>ShipmentID/</td>
<th>MaterialID/</td>
<th>ItemID/</td>
</tr>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="AssetMgtSearch">
<ItemTemplate>
<tr>
<td colspan="3" style="border-top:solid thin blue"> </td>
</tr>
<tr>
<td><%#Container.DataItem(0)%></td>
<td><%#Container.DataItem(1)%></td>
<td><%#Container.DataItem(2)%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
按秒打我。 – AllenG 2009-06-16 17:14:13