I have a DataList like so:
<asp:DataList ID="dlMyList" runat="server" RepeatColumns="5" RepeatDirection="Horizontal" CellSpacing="5" > <ItemTemplate> <asp:CheckBox ID="cbMyBox" Runat="server" Text='<%# Container.DataItem%>' ToolTip=''></asp:CheckBox> </ItemTemplate> </asp:DataList>
I'm binding this to a Dictionary:
Dictionary<string, string> l_CheckboxData = GetCheckboxData(); this.dlMyList.DataSource = l_CheckboxData; this.dlMyList.DataBind();
At the moment, both the key and the value from the dictionary are set as the Text for each checkbox. I'd like to have it such that they Dictionary's key is the Text property and the Dictionary's value is the ToolTip. How would I go about this? Thanks.
wsdl.exe results in “SOAP 1.1 binding was not found”
How do I use an asp.net user control in another user control?
Changing the name in the header for a resource handler in C#
<asp:CheckBox ID="cbMyBox" Runat="server" Text='<%# Eval("Key")%>' ToolTip='<%#Eval("Value")'></asp:CheckBox>
Design Question - Control Array