I am not sure if I got you right, but I seem to have problems binding one dataset, never mind 5, I am trying to bind in page_load to just a single Pane and it shows up, but nothin appears in the pane. If I try to fill five datasets, am I to bind these to five panes?, I am not sure how to do this as i am new to ajax controls. Here is my code:
protected void Page_Load(object sender, EventArgs e)
{
int MemberID = 7; //for test, this should be binded to session ID or something like that
TopRatedPhotosLibrary.
TopRatedPhotosController MyControl = new TopRatedPhotosLibrary.TopRatedPhotosController();DataSet MemberStats = MyControl.GetPane1(MemberID);
MemberType.Text = MemberStats.Tables[0].Rows[0][
"MemberType"].ToString(); //this is for test onlyStorageSize.Text = MemberStats.Tables[1].Rows[0]["StorageSize"].ToString(); //this is for test onlyUserStatsPanel.Visible = true;
DataList1.DataSource = MemberStats;
DataList1.DataBind();
}
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server"><title>Untitled Page</title>
</
head>
<
body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="UserStatsPanel" runat="server" Height="230px" Width="324px">
<asp:TextBox ID="StorageSize" runat="server"></asp:TextBox>
<asp:TextBox ID="MemberType" runat="server"></asp:TextBox></asp:Panel>
</div>
<asp:DataList runat="server" id="DataList1">
<HeaderTemplate>
<table>
<tr>
<td><h1>Member Stats</h1></th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<table>
<tr><td>Member Type:</td><td><%# DataBinder.Eval(Container, "DataItem.MemberType") %></td></tr><%--this will not bind as the stored procedure is comprised of 9 selects, hence 9 tables(dataset) can i alter DataItem.StorageSize to reflect other dataset table? in the same pane
<tr><td>Storage Size:</td><td><%# DataBinder.Eval(Container, "DataItem.StorageSize") %></td></tr>
--%>
</table>
</ItemTemplate>
<separatorTemplate>
<hr>
</separatorTemplate>
<FooterTemplate>
</table></FooterTemplate>
</
asp:DataList>
<%--<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetPane1"
TypeName="TopRatedPhotosLibrary.TopRatedPhotosController">
<SelectParameters>
<asp:Parameter DefaultValue="7" Name="MemberID" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>--%>
</form></body>
</
html>
And I am trying to bind to my BLL as ObjectdataSource as sqldatasource does not work for me as in this example the SQLquery has 10 select's in it with many aggregate values and comes back as many tables (dataset) when i really need it in one table