473,779 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SelectedItemTem plate does not show in datalist

Hi,

I have the following templates inside a datalist:

<SelectedItemTe mplate>
&nbsp;<%# Container.DataI tem("Title") %>
</SelectedItemTem plate>
<ItemTemplate >
&nbsp;<asp:Link Button id="lnkAction" runat="server" cssClass="Other Tabs"><%#
Container.DataI tem("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 1782
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******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

I have the following templates inside a datalist:

<SelectedItemTe mplate>
&nbsp;<%# Container.DataI tem("Title") %>
</SelectedItemTem plate>
<ItemTemplate >
&nbsp;<asp:Link Button id="lnkAction" runat="server"
cssClass="Other Tabs"><%#
Container.DataI tem("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
1319
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 refresh my page. Only when I use another browers. What can I do about this? Thx
0
993
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 grdOrders. That all works fine. The problem that I have, is that I want to either remove a column or make a column invisible within the subgrid - "grdOrderLines". But I can't seem to get a reference to the grid in any events. I've tried the...
1
2475
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: When I click a item to be selected, the datalist applies the SelectedItemStyle on that Item, but not the SelectedItemTemplate. When I click the same Item a second time asp.net applies both the SelectedItemStyle and the SelectedItemTemplate, but does...
0
1355
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 when view the souce from internet explorer view-->Source it display the first dataitem all the time as a html. Also I have a future to show all without filter and when i do that it does populate the all dataitems but the html source is still old...
1
2940
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: ------------------------------------------------------------------ <ASP:DataList id="MyDataList" RepeatColumns="3" runat="server"> <ItemTemplate> <table cellpadding="0" cellspacing="0">
0
1275
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 displayed in a datalist. By default, I do not display the full description of the wines but this should be possible by clicking on a "View details" link. I am looking for a javascript to "hide/show" a panel with the optional field. I remember that...
2
1923
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 selected thumbnail. It also has "Add Picture" and "Delete Picture" buttons. "Add Picture" will add a new picture, while "Delete Picture" will remove the currently selected picture. These are both ASP:ImageButtons, with the functionality...
1
1074
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 datalist1:show all the news group datalist 2:show all the news subject but now i want to appear 3 datalist when i choose in name on news subject so it link to another page(show detail the news) shownews.aspx in this that it show all three datalist...
2
1643
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 in the DataList is the red X for these files. Am I asking it to do something that is not possible? If not, are there any alternatives to showing a reduced image for other file types in a DataList? Thanks. My DataList control is shown below. ...
0
9636
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
10138
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
9930
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
8961
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6724
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
5373
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
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
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
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.