I am working on a page aspx, and the following code is inserted into the control Repeater:
<%# ((System.Collections.Generic.List<double>)DataBinder.Eval(Container.DataItem, "BookPrices")).Max() %>
It raises the following error: 'System.Collections.Generic.List<double>' does not contain a definition for 'Max'
The list has a method Max(), so I may have messed up my code somehow. What is my problem?
BookPrices- the object list<double>that I would like to print with the maximum value.
PS You guys are great! I did not find answers to many of my questions on the Internet. You are truly life savers. Many thanks!:)
iTayb source
share