Click here to Skip to main content
15,914,111 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWebservice from Javascript Pin
seee sharp1-Aug-06 7:07
seee sharp1-Aug-06 7:07 
AnswerRe: Webservice from Javascript [modified] Pin
Tim Kohler1-Aug-06 9:38
Tim Kohler1-Aug-06 9:38 
QuestionCache vs Application variable Pin
honeyman_can1-Aug-06 6:35
honeyman_can1-Aug-06 6:35 
AnswerRe: Cache vs Application variable Pin
Tim Kohler1-Aug-06 8:52
Tim Kohler1-Aug-06 8:52 
The Applicaton state (i.e. Application["myVariable"]) and Application Cache (System.Web.HttpContext.Current.Cache.Add(...) in the System.Web.Caching namespace) are similar in purpose. That being that they cache non user specific data in memory on a web server.

The app cache however, offers the following advantages:

1. You can set an expiration policy (sliding, absolute) that dictates when your item will be removed from the memory space. This can be useful with sliding expiration to not hold large items in the cache after they haven't been accessed in say 10 minutes. The absolute is useful if you have mostly static data you want to cache but say it gets updated in its source periodically. You can set the absolute expiration to flush it out of your web app. Coupling that idea with #2:

2. You can set an expiration delegate that will get called when the item is removed from the cache. This can be useful to refresh a stale cache in the case of absolute expiration. Say you have a set of items you offer for sale. You might choose to cache some part of that set. If you realize that your set only changes say in the middle of the night, you might set the absolute expiration accordingly and string an expiration delegate onto it. Then when the item is removed from the cache, you can run some code via the delegate to build a new, updated set and cache that.


So, all in all, app cache lets you be less of a memory hog by controlling when your item is removed. It also allows some interesting ways to keep the cache in sync in certain situations.




QuestionDynamic User Control Creation Pin
sonicsqwirl1-Aug-06 5:54
sonicsqwirl1-Aug-06 5:54 
AnswerRe: Dynamic User Control Creation Pin
Are Jay1-Aug-06 8:51
Are Jay1-Aug-06 8:51 
AnswerRe: Dynamic User Control Creation Pin
minhpc_bk1-Aug-06 15:29
minhpc_bk1-Aug-06 15:29 
AnswerRe: Dynamic User Control Creation Pin
user55691-Aug-06 22:26
user55691-Aug-06 22:26 
QuestionHow to keep a tooltip for Pageindex of numeric in Datagrid Pin
narendrakumarp1-Aug-06 5:53
narendrakumarp1-Aug-06 5:53 
AnswerRe: How to keep a tooltip for Pageindex of numeric in Datagrid Pin
minhpc_bk1-Aug-06 16:02
minhpc_bk1-Aug-06 16:02 
QuestionASP.NET 2.0 TreeView control Pin
Omkar Ghaisas1-Aug-06 5:39
Omkar Ghaisas1-Aug-06 5:39 
AnswerRe: ASP.NET 2.0 TreeView control Pin
minhpc_bk1-Aug-06 16:04
minhpc_bk1-Aug-06 16:04 
QuestionEdit button in a datalist control which is in another datalist control Pin
deepaks31-Aug-06 5:30
deepaks31-Aug-06 5:30 
AnswerRe: Edit button in a datalist control which is in another datalist control Pin
minhpc_bk1-Aug-06 16:05
minhpc_bk1-Aug-06 16:05 
QuestionMaster Page+ content page+Data Pin
Naveed Kamboh1-Aug-06 5:03
Naveed Kamboh1-Aug-06 5:03 
AnswerRe: Master Page+ content page+Data Pin
ToddHileHoffer1-Aug-06 5:19
ToddHileHoffer1-Aug-06 5:19 
AnswerRe: Master Page+ content page+Data Pin
Naveed Kamboh1-Aug-06 5:39
Naveed Kamboh1-Aug-06 5:39 
GeneralRe: Master Page+ content page+Data Pin
ToddHileHoffer1-Aug-06 5:56
ToddHileHoffer1-Aug-06 5:56 
GeneralRe: Master Page+ content page+Data Pin
Naveed Kamboh1-Aug-06 6:16
Naveed Kamboh1-Aug-06 6:16 
GeneralRe: Master Page+ content page+Data/I have sorted Pin
Naveed Kamboh1-Aug-06 7:20
Naveed Kamboh1-Aug-06 7:20 
GeneralRe: Master Page+ content page+Data Pin
ToddHileHoffer1-Aug-06 7:25
ToddHileHoffer1-Aug-06 7:25 
QuestionHow do access server side textbox value in javascript Pin
ragupathi.p1-Aug-06 5:00
ragupathi.p1-Aug-06 5:00 
AnswerRe: How do access server side textbox value in javascript Pin
minhpc_bk1-Aug-06 16:07
minhpc_bk1-Aug-06 16:07 
QuestionHow do I extend the precision of a range validator, 1.1 Pin
mrinmayeek1-Aug-06 4:46
mrinmayeek1-Aug-06 4:46 
AnswerRe: How do I extend the precision of a range validator, 1.1 Pin
Paddy Boyd1-Aug-06 5:03
Paddy Boyd1-Aug-06 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.