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 ?