Hello all,
I am using the below code in one of my pages:
Quote:
quote:
if (Cache["DateList"] == null)
{
System.Data.IDataReader DateReader = Data.Dates();
while (DateReader.Read())
{
DateList[DateReader["Date"]] = DateReader["Date"];
}
DateReader.Close();
Cache.Insert("DateList", DateList, null, DateTime.Now.AddMinutes(1), Cache.NoSlidingExpiration);
}
|
Upon executing the above code, I am getting the below error:
Quote:
quote:
Compiler Error Message: CS0118: 'System.Web.Caching.Cache' is a 'type' but is used like a 'variable'
Source Error:
Line 31: if (Cache["DateList"] == null)
|
Can anyone please help?
Thanks?
-Vishal