Here is the problem. I am getting IEnumerable from ViewPage and when I tried it to convert List it is showing me error like:
\'
System.Collection
You're missing a reference to System.Linq.
Add
using System.Linq
to get access to the ToList() function on the current code file.
To give a little bit of information over why this is necessary, Enumerable.ToList
is an extension method. Extension methods are defined outside the original class that it targets. In this case, the extension method is defined on System.Linq
namespace.