Cast an Anonymous Types in Object and retrieve one Field
问题 I use C# asp.net4. I have a method to populate a Repeater with Anonymous Types (Fields: Title, CategoryId), inside the Repeater I also placed a Label: var parentCategories = from c in context.CmsCategories where c.CategoryNodeLevel == 1 select new { c.Title, c.CategoryId }; uxRepeter.DataSource = parentCategories; uxRepeter.DataBind(); I need to change Text Properties for each label inside my Repeater on Repeater Event ItemDataBound protected void uxRepeter_ItemDataBound(object sender,