Object reference required for non-static field, method, or property

后端 未结 3 1341
余生分开走
余生分开走 2021-01-18 22:14

I want to use the Caching.Cache(...) method, like so:

Cache.Insert(\"Interview Questions\", datatable, sqlcachedep)

or

Syst         


        
3条回答
  •  不要未来只要你来
    2021-01-18 22:44

    You need to do

    Page.Cache.Insert()
    

    (I'm assuming you're talking ASP.Net). You're calling on Cache as the class, not as the instance of it.

提交回复
热议问题