Thursday, June 21, 2012

Using Cache in ASP.NET


if (Cache["Name"] != null)

Label1.Text = "Hello," + (string)Cache["Name"];

else

Label1.Text = "Hello, guest! ";


Setting Cache Expiry


Cache.Insert("Name", "Kevin", null, DateTime.Now.AddMinutes(10), TimeSpan.Zero);



2 comments:

  1. To make it fun, you can use int number variables or code date to define the day and time of day. One of the many tips you'll find in web development company sydney, where code templates are available.

    ReplyDelete
  2. It's a good thing we have web design and development team that handles this thing. I don't want to add these complications in my heavy work load.

    -Gwyn Stiles

    ReplyDelete