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

convert foreign key value in repeater

TJS
while creating values in a repeater, I want ot replace the foreign key value
with a text value.

<asp:repeater id="scores" runat="server" OnItemCreated="Scores_itemCreated">
.....
<ItemTemplate>
<tr bgcolor="#EEEEEE"" >
<td><%# container.DataItem("idEvent") %></td>
.....
i was thinking of using OnItemCreated with a query to lookup the text name
and reassign it to be the display but can't figure out how to do this.

Any suggestions ?

Nov 19 '05 #1
3 1086
OnItemDataBound seems like the smart way to do it:
http://openmymind.net/index.aspx?documentId=8

alternatively, you could use

<%# GetItemName(Container.DataItem("idEvent")) %>

and have a function:

protected string function GetItemName(byval eventId as string)
...
end function

read the tutorial, talks about both methods..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"TJS" <no****@here.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
while creating values in a repeater, I want ot replace the foreign key value with a text value.

<asp:repeater id="scores" runat="server" OnItemCreated="Scores_itemCreated"> ....
<ItemTemplate>
<tr bgcolor="#EEEEEE"" >
<td><%# container.DataItem("idEvent") %></td>
....
i was thinking of using OnItemCreated with a query to lookup the text name and reassign it to be the display but can't figure out how to do this.

Any suggestions ?

Nov 19 '05 #2
TJS
thanks, the function idea works great.

Just a note on your article, the content has to be scrolled back and forth
in order to read it.

I have a high resolution screen , 15 in monitor and it still didn't fit.
Nov 19 '05 #3
ya...I'll fix that one day :)

thx.

karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"TJS" <no****@here.com> wrote in message
news:u4**************@TK2MSFTNGP15.phx.gbl...
thanks, the function idea works great.

Just a note on your article, the content has to be scrolled back and forth
in order to read it.

I have a high resolution screen , 15 in monitor and it still didn't fit.

Nov 19 '05 #4

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

Similar topics

1
by: Andrew DeFaria | last post by:
I created the following .sql file to demonstrate a problem I'm having. According to the manual: If |ON DELETE CASCADE| is specified, and a row in the parent table is deleted, then InnoDB...
3
by: Thubaiti | last post by:
Hi, I have this code in my ASP.NET and I want to convert it to C# (code behind) <asp:Repeater id="subCategoryRepeater" runat="server"> <ItemTemplate> <ul> <li> <asp:HyperLink...
1
by: Greg Cyrus | last post by:
Hi, i have created a function to open a Databse by OLEDB and fill it into a System.Data.DataSet-Objekt by oleDBAdapter.Fill-Mehtod.. Now I want to assign this DataSet to a normal...
2
by: Brad Baker | last post by:
I'm trying to write a small asp.net webpage in c#. I've written code which connects to a microsoft sql database, runs a sql query and then prints that data out using a repeater. The problem is...
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?
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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.