Click here to Skip to main content
15,888,351 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAny possibility to avoid cache in asp.net Pin
anushh15-Sep-09 21:18
anushh15-Sep-09 21:18 
AnswerRe: Any possibility to avoid cache in asp.net Pin
Christian Graus15-Sep-09 21:25
protectorChristian Graus15-Sep-09 21:25 
GeneralRe: Any possibility to avoid cache in asp.net Pin
anushh15-Sep-09 21:46
anushh15-Sep-09 21:46 
GeneralRe: Any possibility to avoid cache in asp.net Pin
Christian Graus15-Sep-09 21:50
protectorChristian Graus15-Sep-09 21:50 
GeneralRe: Any possibility to avoid cache in asp.net Pin
N a v a n e e t h15-Sep-09 22:13
N a v a n e e t h15-Sep-09 22:13 
AnswerRe: Any possibility to avoid cache in asp.net Pin
Abhishek Sur15-Sep-09 21:45
professionalAbhishek Sur15-Sep-09 21:45 
GeneralRe: Any possibility to avoid cache in asp.net Pin
anushh15-Sep-09 21:48
anushh15-Sep-09 21:48 
GeneralRe: Any possibility to avoid cache in asp.net Pin
Abhishek Sur15-Sep-09 22:03
professionalAbhishek Sur15-Sep-09 22:03 
Remove Output Cache for One Page
HttpResponse.RemoveOutputCacheItem("/foldername/CacheForever.aspx");


Add Key Dependency to Page
Response.AddCacheItemDependency("clearcachekey");

Means we placed a dependance on smallkey. Now place this in global.aspx
protected void Application_Start(Object sender, EventArgs e)
{
      HttpContext.Current.Cache.Insert("clearcachekey", DateTime.Now, null,
            System.DateTime.MaxValue, System.TimeSpan.Zero,
            System.Web.Caching.CacheItemPriority.NotRemovable,
            null);
}


or add this in pageload on which you want to remove cache :
HttpContext.Current.Cache.Insert("clearcachekey", DateTime.Now, null,
            System.DateTime.MaxValue, System.TimeSpan.Zero,
            System.Web.Caching.CacheItemPriority.NotRemovable,
            null);


Thumbs Up | :thumbsup:

Abhishek Sur

My Latest Articles
Create CLR objects in SQL Server 2005
C# Uncommon Keywords
Read/Write Excel using OleDB

Don't forget to click "Good Answer" if you like to.

QuestionJavascript validation in asp.net for a textbox and dropdown Pin
rummer15-Sep-09 20:42
rummer15-Sep-09 20:42 
AnswerRe: Javascript validation in asp.net for a textbox and dropdown Pin
Vimalsoft(Pty) Ltd15-Sep-09 20:48
professionalVimalsoft(Pty) Ltd15-Sep-09 20:48 
AnswerRe: Javascript validation in asp.net for a textbox and dropdown Pin
Christian Graus15-Sep-09 21:15
protectorChristian Graus15-Sep-09 21:15 
AnswerRe: Javascript validation in asp.net for a textbox and dropdown Pin
Abhishek Sur15-Sep-09 21:52
professionalAbhishek Sur15-Sep-09 21:52 
GeneralRe: Javascript validation in asp.net for a textbox and dropdown Pin
Christian Graus15-Sep-09 21:57
protectorChristian Graus15-Sep-09 21:57 
GeneralRe: Javascript validation in asp.net for a textbox and dropdown Pin
Abhishek Sur15-Sep-09 22:09
professionalAbhishek Sur15-Sep-09 22:09 
GeneralRe: Javascript validation in asp.net for a textbox and dropdown Pin
Christian Graus15-Sep-09 22:10
protectorChristian Graus15-Sep-09 22:10 
GeneralRe: Javascript validation in asp.net for a textbox and dropdown Pin
Abhishek Sur15-Sep-09 22:43
professionalAbhishek Sur15-Sep-09 22:43 
AnswerRe: Javascript validation in asp.net for a textbox and dropdown Pin
Arun Jacob15-Sep-09 22:51
Arun Jacob15-Sep-09 22:51 
QuestionProblem in populating a treeview from database Pin
rinku soni 2315-Sep-09 20:23
rinku soni 2315-Sep-09 20:23 
AnswerRe: Problem in populating a treeview from database Pin
Abhijit Jana15-Sep-09 20:27
professionalAbhijit Jana15-Sep-09 20:27 
AnswerRe: Problem in populating a treeview from database Pin
Christian Graus15-Sep-09 21:18
protectorChristian Graus15-Sep-09 21:18 
AnswerRe: Problem in populating a treeview from database Pin
N a v a n e e t h15-Sep-09 22:08
N a v a n e e t h15-Sep-09 22:08 
GeneralRe: Problem in populating a treeview from database Pin
Abhishek Sur15-Sep-09 22:11
professionalAbhishek Sur15-Sep-09 22:11 
GeneralRe: Problem in populating a treeview from database Pin
N a v a n e e t h15-Sep-09 22:14
N a v a n e e t h15-Sep-09 22:14 
QuestionHow dynamic objects work during a post back Pin
compninja2515-Sep-09 14:58
compninja2515-Sep-09 14:58 
AnswerRe: How dynamic objects work during a post back Pin
Christian Graus15-Sep-09 15:00
protectorChristian Graus15-Sep-09 15:00 

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.