How to map IDictionary to repeater?

  • Thread starter Thread starter SushiSean
  • Start date Start date
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.
 
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
 
Back
Top