Getting DataBinder Item's max value
- by iTayb
I'm working at the aspx page, and the following code is inserted in a Repeater control:
<%# ((System.Collections.Generic.List<double>)DataBinder.Eval(Container.DataItem, "BookPrices")).Max() %>
Brings up the following error: 'System.Collections.Generic.List<double>' does not contain a definition for 'Max'
List does have an method of Max(), so I'm possibly messing up my code somehow. What is my problem?
BookPrices is a list<double> object, which I'd like to print it's maximum value.
P.S. You guys are great! I didn't find answers for many of my questions on the web. You really are life savers. Thank you very much! :)