V
Vivian
I know that the data cache is for private use, is there any method to get
the cache value from another class? I have a public function to get the
cache value and error occurs when I call it from another class. Error :
Cache is not available.
Thanks.
The code is as follows:
public class WebForm1 : System.Web.UI.Page
{
public string GetCache(string name)
{
return Cache[name];
}
}
public class Openfile
{
public void open()
{
namespace.WebForm1 parentForm = new WebForm1();
string cachevalue;
cachevalue = parentForm.GetCache("filename");
}
}
the cache value from another class? I have a public function to get the
cache value and error occurs when I call it from another class. Error :
Cache is not available.
Thanks.
The code is as follows:
public class WebForm1 : System.Web.UI.Page
{
public string GetCache(string name)
{
return Cache[name];
}
}
public class Openfile
{
public void open()
{
namespace.WebForm1 parentForm = new WebForm1();
string cachevalue;
cachevalue = parentForm.GetCache("filename");
}
}