By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,608 Members | 1,940 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,608 IT Pros & Developers. It's quick & easy.

First item disappears in datalist and data repeater

P: n/a
When I tried to display data in datalist and repeater, the first data item
always disappears in all datalist and repeaters in my web forms. The code I
use for the html page is:

<TD id="tdDepartment" runat="server"><asp:datalist id="dlstDept"
runat="server" HorizontalAlign="Left" CellPadding="0" Width="100%">
<HeaderTemplate>
<p><b>Department Info</b></p>
</HeaderTemplate>
<ItemTemplate>
<font size="2">&nbsp;&nbsp; <a href='department.aspx?id=<%#
databinder.eval(container.dataitem, "DeptID")%>' class="categoryLink">
<%# databinder.eval(container.dataitem, "DeptName") %>
</a></font>
</ItemTemplate>
</asp:datalist></TD>
And the code I use for the VB page is:

With dlstDept
.DataSource = drDept
.DataBind()
End With

Where drDept is an ODBCDataReader, since I am using MySQL.

(note: This issue only happened in the datalist and repeater of my web
project, everything else (including listbox and dropdown) is fine.)

One thing I am not sure is the, class="categoryLink", part.... Please help!

Any advise are very appreciated. Thank you!
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
* "Simon Cheng" <sc****@goodmans.ca> scripsit:
When I tried to display data in datalist and repeater, the first data item
always disappears in all datalist and repeaters in my web forms. The code I
use for the html page is:

<TD id="tdDepartment" runat="server"><asp:datalist id="dlstDept"
runat="server" HorizontalAlign="Left" CellPadding="0" Width="100%">
<HeaderTemplate>
<p><b>Department Info</b></p>
</HeaderTemplate>
<ItemTemplate>
<font size="2">&nbsp;&nbsp; <a href='department.aspx?id=<%#
databinder.eval(container.dataitem, "DeptID")%>' class="categoryLink">
<%# databinder.eval(container.dataitem, "DeptName") %>
</a></font>
</ItemTemplate>
</asp:datalist></TD>


<news://news.microsoft.com/microsoft.public.dotnet.framework.aspnet>
<news://news.microsoft.com/microsoft.public.dotnet.framework.aspnet.datagridc ontrol>
<news://news.microsoft.com/microsoft.public.dotnet.framework.aspnet.webcontro ls>

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.