Cache object code - Caching pages and data
Q. What code you will write for using the cache object?- Published on 27 Jul 15a.
// Storing the value. Cache["name"]="CareerRide";
// Retrieving the value on any webpage within the application. if (Cache["name"] != null)
Label1.Text= Cache["name"].ToString();
b.
// Storing the value. Cache="CareerRide";
// Retrieving the value on any webpage within the application. if (Cache != null)
Label1.Text= Cache.getStringValue;
c.
// Storing the value. Cache["name"]="CareerRide";
// Retrieving the value on any webpage within the application. if (Cache["name"] != null)
Label1.Text= Cache["name"].Text;
d. None of the above.
ANSWER:
// Storing the value. Cache["name"]="CareerRide";
// Retrieving the value on any webpage within the application. if (Cache["name"] != null)
Label1.Text= Cache["name"].ToString();