Can someone please point out what I am doing wrong here? The statement:
Cache.Insert("Svc_Table", dataSet.Tables["Svc"]);
causes the following compiler error:
"An object reference is required for the nonstatic field, method, or
property 'System.Web.Caching.Cache.Insert(string, object)'
C:\Interfaces\App_Code\FileSystemAccess.cs 37 9 C:\Interfaces\"
Any suggestions will be appreciated.
Thanks,
Keith
sloan - 03 Oct 2006 21:50 GMT
Did you try null checking it?
if(null!=dataSet)
{
if (null!=dataSet.Tables["Svc"])
{
//null checks pass ok
Cache.Insert("Svc_Table", dataSet.Tables["Svc"]);
}
}
> Can someone please point out what I am doing wrong here? The statement:
>
[quoted text clipped - 11 lines]
>
> Keith