If you have to provide some services to all users of your website then….

If you have to provide some data or services to all of your web users then best option is to put those data values into applicaiton object. This process will make your application very fast.

You can use Global.asax  file and can use  following event.  Following code first puts value into a hashtable and then this hash table is added to the applicaiton object of Asp.net. C# code.protected void Application_BeginRequest(Object sender, EventArgs e){

Hashtable userHash = new Hashtable();

foreach (User user in userDetails)
userHash.Add(user.Id, user.UserName);

Application.Add(cachekey, userHash);


Tags: , , , , , , ,

Comments are closed.