473,409 Members | 1,942 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,409 software developers and data experts.

SelectedItemTemplate does not show in datalist

Hi,

I have the following templates inside a datalist:

<SelectedItemTemplate>
&nbsp;<%# Container.DataItem("Title") %>
</SelectedItemTemplate>
<ItemTemplate>
&nbsp;<asp:LinkButton id="lnkAction" runat="server" cssClass="OtherTabs"><%#
Container.DataItem("Title") %></asp:LinkButton>
</ItemTemplate>
The Titles show up regular items. But when an item is selected, Title
disappears, I only see a blank space. I am sure Title has value because it
shows when the item is not selected.

Any Ideas?

TIA
Nov 19 '05 #1
1 1753
Chances are, it has to do with the way you are binding or the way you are
setting the SelectedIndex. Could you post some more code (specifically, the
entire DataList declaration, as well as the code-behind methods that bind
your data and set the SelectedIndex value. From what you've posted, it looks
as if your code will work, therefore, it must be something in your code
which is causing the problem.

Thanks,
Johann MacDonagh

"Raymond Du" <rd**@yahoo.com> wrote in message
news:ey****************@TK2MSFTNGP09.phx.gbl...
Hi,

I have the following templates inside a datalist:

<SelectedItemTemplate>
&nbsp;<%# Container.DataItem("Title") %>
</SelectedItemTemplate>
<ItemTemplate>
&nbsp;<asp:LinkButton id="lnkAction" runat="server"
cssClass="OtherTabs"><%#
Container.DataItem("Title") %></asp:LinkButton>
</ItemTemplate>
The Titles show up regular items. But when an item is selected, Title
disappears, I only see a blank space. I am sure Title has value because it
shows when the item is not selected.

Any Ideas?

TIA

Nov 19 '05 #2

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

Similar topics

1
by: Fred Geurtsen | last post by:
Hi, I have made a backoffice where I can put Images and text in the Database. The website load these in a datalist. The thing is that my page does not show the new items! Not even when I...
0
by: Randy Vande Hei | last post by:
I have a datagrid (grdOrderLines) within the SelectedItemTemplate section of another grid (grdOrders). I dynamically set the datasource of grdOrderLines based on the key information with the...
1
by: Dirk Meusel | last post by:
Background: On my webform a simple datalist shows one column. The databind is done in the page_load event. In the ItemTemplate a linkbutton serves for providing the Select Command. Problem:...
0
by: priyank | last post by:
I have a datasource as a xml file. I display one row at a time based on filter value. when I chage different value the datalist displays currect information on display based on filter value but...
1
by: lydia sista via DotNetMonster.com | last post by:
hi! help... How do you show/hide item's data? Like sale item on product catalogue. I want to show the sale image when the status of product is on sale. in my catalogue I use datalist:...
0
by: Michel Couche | last post by:
Hello, I use a datalist to display the results of a search in a database of wines. One of the fields contains a full decsription of the wines. When a visitor makes a search, the results are...
2
by: RB | last post by:
Hi there, I'm having a problem with an ASP.NET/VB.NET Control I am writing. The control is a simple gallery control, which shows a set of thumbnails (using a DataList), and a main image of the...
1
by: phuc2583 | last post by:
Hello everybody! I have some problem with my code but i can not do it,i tried my best to do this way or another way so i can... I have a page showsubject.aspx it contain to two datalist...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...
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,...
0
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...

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.