How to map IDictionary to repeater?

S

SushiSean

I have repeater and IDictionary. In dictionary I add values like name and age.
IDictionary TestDictionary = new Hashtable();
SiteImages.Add(23, "John Smith");
SiteImages.Add(14, "Some Some1");

And when I map this to repeater it works, but how to get those values?

<asp:Repeater runat=server id=Test1>
<ItemTemplate>
<%# Container.DataItem %>
</ItemTemplate>
</asp:Repeater>

Container.DataItem - doesn't work correct. How I can show key and value from
IDictionary.
 
O

oroussea

I have repeater and IDictionary. In dictionary I add values like name and age.
IDictionary TestDictionary = new Hashtable();
SiteImages.Add(23, "John Smith");
SiteImages.Add(14, "Some Some1");

And when I map this to repeater it works, but how to get those values?

<asp:Repeater runat=server id=Test1>
<ItemTemplate>
   <%# Container.DataItem %>
</ItemTemplate>
</asp:Repeater>

Container.DataItem - doesn't work correct. How I can show key and value from
IDictionary.

http://forums.asp.net/p/1184360/2020322.aspx#2020322
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top