473,804 Members | 3,191 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I need help with datalist

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="Web Form1.aspx.vb"
Inherits="DataL ist2.WebForm1"% >
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " content="Micros oft Visual Studio.NET 7.0">
<meta name="CODE_LANG UAGE" content="Visual Basic 7.0">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:DataList id=DataList1 style="Z-INDEX: 101; LEFT: 94px; POSITION:
absolute; TOP: 47px" runat="server" DataSource="<%# DataSet11 %>"
DataKeyField="E mployeeID" DataMember="Emp loyees">
<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>
<SeparatorTempl ate>
*************** *************** *************** ***
</SeparatorTempla te>
</asp:DataList>
</form>
</body>
</HTML>
Nov 19 '05 #1
1 1159
Please disregard this message as I have already found my error. Thanks
anyway.
"student" <mr********@yah oo.com> wrote in message
news:5O******** **********@news svr19.news.prod igy.com...
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="Web Form1.aspx.vb" Inherits="DataL ist2.WebForm1"% >
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " content="Micros oft Visual Studio.NET 7.0">
<meta name="CODE_LANG UAGE" content="Visual Basic 7.0">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:DataList id=DataList1 style="Z-INDEX: 101; LEFT: 94px; POSITION:
absolute; TOP: 47px" runat="server" DataSource="<%# DataSet11 %>"
DataKeyField="E mployeeID" DataMember="Emp loyees">
<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>
<SeparatorTempl ate>
*************** *************** *************** ***
</SeparatorTempla te>
</asp:DataList>
</form>
</body>
</HTML>

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3428
by: Ken R. | last post by:
Hello all, I am relatively new to python but I am having an issue with custom sort functions.. I am trying to sort a list of lists or tuples with arbitrary ascending or descending sorts. For example given a list of tuples ('firstname','lastname','age') I want to be able to sort lastname descending, firstname ascending and age ascending... I wrote a custom function generator to generate a sort function based
2
3078
by: Gary | last post by:
Hi, I am a Chinese student, I have a problem with the following code //The follwing code in StaticSearch.h: // template <class Type> class dataList; // template <class Type> class Node //Êý¾Ý±íÖнáµãÀàµÄ¶¨Òå
1
1768
by: pete K | last post by:
Is it possible in asp.net to have a datalist in the itemtemplate of another datalist? For example: <asp:datalist id="MyList" runat="server"> <ItemTemplate> <table border="0" width="300"> <tr> <td><%# DataBinder.Eval(Container.DataItem, "title") %></td>
1
1672
by: mahsa | last post by:
H data I'm binding to the DataList is information about products in my product database. Perhaps passed in the QueryString to this page is a ProductID. I might want to make the item in the DataList that has the corresponding ProductID selected. In a similar vein, perhaps I want to have newest product selected by default. How can I acheieve this functionality actuly i use pagin <%@ Page language="c#" Codebehind="product.aspx.cs"...
2
2199
by: News | last post by:
Hi, I need help with datalist and linkbutton. I need a LinkButton to display in datalist if datafield "is_measure_customchecklist" in a db table set to true. Here is the code (in parts): <asp:DataList id="dtl1" runat="server"
0
848
by: Ed Chiu | last post by:
Hi, I nested a datagrid inside a datalist, inside the datalist I have a linkbutton which will toggle the datagrid between visible and invisble. Question is, I can not find a way to keep track of which datagrids should be visible or invisible. I tried to declare an arraylist variable in the code behind file, and insert an entry when one becomes available. But the arraylist varaiable is lost during the postback. By the way, in order to...
5
2055
by: Petr SIMUNEK | last post by:
Is there a way to render something before the DATALIST encapsulation table gets rendered ? So that I could have Label before actual table that is rendered by DATALIST... <h1>Some Label</h1> <TABLE ID='DataList' width='100%'> *** inside datalist objects rendered *** </TABLE> Thanx to all...
2
4715
by: Jack | last post by:
Hello, I need to add extra buttons to a datalist, but I don't know to add them to the control. I need to use the onCommand Functions, like OnUpdate, OnEdit, OnUpdate, OnCanel, Etc. I would like to do this VB.Net is that is can be done. Any help would be great, I have been trying to do this for a while and need help. Thanks in advance for any help,
3
10305
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template (where is the child DataList).... But in case I want to make Edit in this child DataList it is not working... No edit template showed... :( this is a code that i use for the child DataList... Edit command // this is for child DataList...
1
3962
by: shantanu_kush | last post by:
Hi there, I am using a DataList in a composite control. The DataList has an Custom ItemTemplate(ITemplate) which adds a Button to the DataList Item as shown in the code below : public class DatalistItemTemplate : ITemplate { public void InstantiateIn(Control container)
0
9707
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10586
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.