S
student
Hello all and thanks for all of the help. I am currently learning how to
display data in a dataList. The problem here is that the data from the
database is not being displayed completely. Only the first row of data is
displayed and repeated on every row afterwards.
Here's the code, please help, and thanks immensely
student
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="DataList2.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<aspataList id=DataList1 style="Z-INDEX: 101; LEFT: 94px; POSITION:
absolute; TOP: 47px" runat="server" DataSource="<%# DataSet11 %>"
DataKeyField="EmployeeID" DataMember="Employees">
<HeaderTemplate>
From Employees Table
</HeaderTemplate>
<ItemTemplate>
<asp:Label id=lblFirstName runat="server" Text='<%#
DataBinder.Eval(DataSet11, "Tables[Employees].DefaultView.[0].FirstName")
%>' Width="85px">
</asp:Label>
<asp:Label id=lblLastName runat="server" Text='<%#
DataBinder.Eval(DataSet11, "Tables[Employees].DefaultView.[0].LastName") %>'
Width="72px">
</asp:Label>
<asp:Label id=lblBirthDate runat="server" Text='<%#
DataBinder.Eval(DataSet11, "Tables.[Employees].DefaultView.[0].BirthDate",
"{0:d}") %>' Width="74px">
</asp:Label>
</ItemTemplate>
<SeparatorTemplate>
************************************************
</SeparatorTemplate>
</aspataList>
</form>
</body>
</HTML>
display data in a dataList. The problem here is that the data from the
database is not being displayed completely. Only the first row of data is
displayed and repeated on every row afterwards.
Here's the code, please help, and thanks immensely
student
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="DataList2.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<aspataList id=DataList1 style="Z-INDEX: 101; LEFT: 94px; POSITION:
absolute; TOP: 47px" runat="server" DataSource="<%# DataSet11 %>"
DataKeyField="EmployeeID" DataMember="Employees">
<HeaderTemplate>
From Employees Table
</HeaderTemplate>
<ItemTemplate>
<asp:Label id=lblFirstName runat="server" Text='<%#
DataBinder.Eval(DataSet11, "Tables[Employees].DefaultView.[0].FirstName")
%>' Width="85px">
</asp:Label>
<asp:Label id=lblLastName runat="server" Text='<%#
DataBinder.Eval(DataSet11, "Tables[Employees].DefaultView.[0].LastName") %>'
Width="72px">
</asp:Label>
<asp:Label id=lblBirthDate runat="server" Text='<%#
DataBinder.Eval(DataSet11, "Tables.[Employees].DefaultView.[0].BirthDate",
"{0:d}") %>' Width="74px">
</asp:Label>
</ItemTemplate>
<SeparatorTemplate>
************************************************
</SeparatorTemplate>
</aspataList>
</form>
</body>
</HTML>