Tuesday, January 13, 2009

State Management - HTTPContext.Current.Items

We can store Objects in HTTPContext.Current.Items for small usages.we can add objects into Items collection just like normal Collections we are using.


LIST listEmployee = HTTPContext.Current.Items as LIST;

if(listEmployee == null)
{
listEmployee = Getyourdata();
HTTPContext.Current.Items["Key"] = listEmployee ;
}

0 comments:

Post a Comment