We help IT Professionals succeed at work.

c# bind to hashtable to a repeater

jackjohnson44 used Ask the Experts™
I have a hash table that I want to bind to a repeater in code, not in the markup.
I was doing this before by casting the e.item.dataitem to the object I was working with before, but I need to cast as a single element of a hashtable.  How do I do that?

This is what I was doing before, using a splistitem (I bound to a splistitemcollection)  I need an object that is a single instance of a hash table item.

                    SPListItem discussionTopic = (SPListItem)e.Item.DataItem;
                    ((Literal)e.Item.FindControl("LabelID")).Text = discussionTopic.ID.ToString();
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®