473,406 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

datalist issue

I have a datalist that will always return 2 records. The first record
should be called "Latest Edition", the second "Previous Edition". How can I
identify which is which in the .net code and replace have this label show up
correctly. Below, I have hardcoded in "Latest Edition"..

<asp:DataList id="DataList1" runat="server" DataSource='<%#
DataBinder.Eval(DsEobNew1, "Tables[fn3ExecBriefHome]") %>'
DataMember="fn3ExecBriefHome" DataKeyField="gc_id" SHOWHEADER="False"
SHOWFOOTER="False">

<ITEMTEMPLATE>
. <B>Latest Edition</B> - <A HREF="index.aspx?pageID=eobDoc&g=<%#
DataBinder.Eval(Container, "DataItem.gc_id") %>"><%#
DataBinder.Eval(Container, "DataItem.published") %></A>
</ITEMTEMPLATE>

</ASP:DATALIST>

--
_____
DC G
Jul 21 '05 #1
2 1317
You can use DataBind event of DataList to do more complex replace or changes
inside item template.

"DC Gringo" wrote:
I have a datalist that will always return 2 records. The first record
should be called "Latest Edition", the second "Previous Edition". How can I
identify which is which in the .net code and replace have this label show up
correctly. Below, I have hardcoded in "Latest Edition"..

<asp:DataList id="DataList1" runat="server" DataSource='<%#
DataBinder.Eval(DsEobNew1, "Tables[fn3ExecBriefHome]") %>'
DataMember="fn3ExecBriefHome" DataKeyField="gc_id" SHOWHEADER="False"
SHOWFOOTER="False">

<ITEMTEMPLATE>
. <B>Latest Edition</B> - <A HREF="index.aspx?pageID=eobDoc&g=<%#
DataBinder.Eval(Container, "DataItem.gc_id") %>"><%#
DataBinder.Eval(Container, "DataItem.published") %></A>
</ITEMTEMPLATE>

</ASP:DATALIST>

--
_____
DC G

Jul 21 '05 #2
Could you elaborate a bit on this? Code sample perhaps?

_____
DC G

"Shailesh Jannu" <Sh***********@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
You can use DataBind event of DataList to do more complex replace or changes inside item template.

"DC Gringo" wrote:
I have a datalist that will always return 2 records. The first record
should be called "Latest Edition", the second "Previous Edition". How can I identify which is which in the .net code and replace have this label show up correctly. Below, I have hardcoded in "Latest Edition"..

<asp:DataList id="DataList1" runat="server" DataSource='<%#
DataBinder.Eval(DsEobNew1, "Tables[fn3ExecBriefHome]") %>'
DataMember="fn3ExecBriefHome" DataKeyField="gc_id" SHOWHEADER="False"
SHOWFOOTER="False">

<ITEMTEMPLATE>
. <B>Latest Edition</B> - <A HREF="index.aspx?pageID=eobDoc&g=<%# DataBinder.Eval(Container, "DataItem.gc_id") %>"><%#
DataBinder.Eval(Container, "DataItem.published") %></A>
</ITEMTEMPLATE>

</ASP:DATALIST>

--
_____
DC G

Jul 21 '05 #3

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

Similar topics

6
by: Gav | last post by:
Hi All, I have created a datalist using the repeatcolumns property to create multiple columns. I have tried to keep everythings width to 100% so that if the window is resized it still looks...
1
by: Paul L | last post by:
Hi, I have an issue with the OnSelectedIndexChanged event not firing for a DropDownList control which is in the ItemTemplate of a DataList. I have made an exact copy of the DropDownList control,...
0
by: Rick Wez | last post by:
I feel like I'm going to pull out my hair (there's not much left); I've read almost every online post trying to figure this out. So I started over with something VERY simple and it still doesn't...
16
by: Vikas Kumar | last post by:
i am selectin some data from database and through reader showing it in datalist as above now for radio buttons i have single column which returns 1,2,3 and according to that i want one of above...
5
by: Vikas Kumar | last post by:
i had coded like this <ItemTemplate> <table width="100%"> <tr width="100%"> <td width="25%"><%#DataBinder.Eval(Container.DataItem,"FName")%></td> <td width="25%"><input type=text ...
0
by: RCon | last post by:
I'm unsure if a datalist with in a datalist is the best option for what i'm doing, which is I have a 3 tables, table1, table2 and table3. Each item in table1 will have multiple items from table2...
5
by: Aussie Rules | last post by:
Hi, I am still having a problem using a datalist control using VB.net This is my code...... In the HTML page I have <asp:DataList ID="DataList1" runat="server">
0
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I am having this problem. I have this datalist and whenever I expand the datalist by the plus button, it overlaps other controls on my web page and sometimes these controls come...
2
by: David C | last post by:
I have a DataList control that shows jpg and gif images just fine. I am filling the DataList from a list of files in a directory. The directory might contain tif and pdf files but all that shows...
4
by: Peter | last post by:
I have a DataList and each item in the datalist has an imge, I want to change the datalist item image on the client side when user clicks a button. How would I do that with JavaScript, does anyone...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.