473,320 Members | 1,832 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,320 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
Nov 18 '05 #1
2 1237
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

Nov 18 '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

Nov 18 '05 #3

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

Similar topics

2
by: DC Gringo | last post by:
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...
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...
0
by: ItNerd | last post by:
The following code causes two letters to be highlighted at once, so for example, if you click on Division 2 letter 'A', the letter 'A' in Division 1 is also highlighted. I want only one letter...
6
by: Mike | last post by:
I have a function that is called when the user clicks the submit button, during this function i also set a varaible to "Y" due to that this function does a post back to the page then redirects....
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,...
2
by: KrippZ | last post by:
Hello I'm having some problems with a a sortedList in C#. My set is as follows: I have a sortedList as a class variable (DataList) I inisiate it in my constructor with DataList = new SortedList()....
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: =?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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.