Web Forms :: Clear Out The Cached WebSiteMap?
Jul 16, 2010
I am using the SqlSiteMapProvider to build my Sitemap ... but I'm guessing that this question is valid for any type of site map.
There's a very specific instance where I need to rebuild the sitemap because the user completes a task and I need the Sitemap to rebuild to reflect that. I don't want to get rid of the natural caching that comes with the Sitemap stuff so I'm wondering if there's some way I can clear the cached map just when this certain task gets completed.
Is there some [Sitemap].clear() type method I can run for this?
View 1 Replies
Similar Messages:
Sep 23, 2012
I have one issue on my localhost running website that is when i submit data from asp.net form . it don't clear the data permanentaly from the page history.like , i submit one record and after this one i double click on the textfields the previous values are shown ?
View 1 Replies
Oct 25, 2013
when i first run my applcation some time its showing the data from cache.i want to avoid it in first time .
i want to cache my all images/css/js file what is the efficient way to do it.
i have lot of images folder /js /css files.
View 1 Replies
May 26, 2010
I am caching a file in ttpContext.Current.Application object. Now when I change the values in file, it does not get reflected in the application (I am reading the values from the file for app version).
Even after restarting the app pool and the website in IIS, the changes does not reflect. I dont want to restart IIS.
View 1 Replies
Oct 27, 2010
I have create user wizard control and i put validation control for all field but when i close user control that validators dint clear in firefox or but clear in IE
View 3 Replies
Mar 16, 2011
I have several JS proxies generated on the page through using code like:
scriptManager.Services.Add(new ServiceReference("~/Service.asmx"));
This code generates the following JS proxy on ASPX page where it is used:
<script src="../../Service.asmx/js" type="text/javascript"></script>
This file is not being cached in browser cache. I checked in firebug and in header it says:
Cache control: private
All other JS and CSS files are being cached with "Cache-Control: public,max-age=8640000". In web.config I have:
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="100.00:00:00" />
</staticContent>
How can I get JS Proxy files to cache?
View 1 Replies
Jan 11, 2011
I have a page that searches and displays records. Users enter a record number and then select the type of record to display from a dropdownlist control. They then edit some data on the page, and the app does some calculations based on the type of record that is selected from the drop down. How do i get to successfully pass the value from the dropdownlist to the method that does the calculation to ensure that the right formula is used? Here is the code that I currently have.
[Code]....
then the code behind to do the calculation looks like this...
[Code]....
After stepping through the code, i noticed that when it gets to the "foreach" block, the value selected by the ddlRecordType dropdownlist is always the default which is "select one" and not any of the other selections that might have been selected.How do I get this to work, so that it can maintain the value selected from the dropdown and used in the code behind?
[Code]....
View 3 Replies
Jan 5, 2011
What is difference between Session.Clear() vs. Session.Contents.Clear()?
I want to clear all the Session variables.
View 1 Replies
Jun 29, 2012
I want to update my cached data , if there is any change in database. , if any change in database/tables happens then my cached data should be updated.
View 1 Replies
Mar 9, 2010
How to force Refresh( F5) conditaionally wehn the pages meet new design.
View 1 Replies
Nov 29, 2010
why all the resources in my page are being requested EVERY single time. E.g. my site.css returns the following headers (using fiddler):
HTTP/1.1 200 OK
Server: ASP.NET Development Server/9.0.0.0
Date: Mon, 29 Nov 2010 17:36:21 GMT
X-AspNet-Version: 2.0.50727
Content-Length: 9093
Cache-Control: public, max-age=2592000
Expires: Wed, 29 Dec 2010 17:36:21 GMT
Last-Modified: Mon, 08 Nov 2010 17:20:16 GMT
Content-Type: text/css
Connection: Close
But every time I hit refresh I see all the resources (css,js,images) getting re-requested. I have control over the headers returned for any and all of these resources, but I haven't figured it out yet.I have even debugged my ASP.NET app and the HttpModule is definitely being asked for the resources again.
EDIT:Ok, I removed must-revalidate, proxy-revalidate from the headers and that is getting me closer to where I want to be, now when I press back it still requests my css/js files when I press back.
View 2 Replies
Mar 29, 2011
I would like to cache a collection in the viewstate, but I wonder if there is a better way to add an item to this collection!
private List<MyClass> CachedItems
{
get { return (List<MyClass>)ViewState["CachedItems"]; }
set { ViewState["CachedItems"] = value; }
}
private void AddToCachedItems(MyClass item)
{
CachedItems = CachedItems.Concat(new[] { item }).ToList();
}
View 1 Replies
Apr 20, 2010
Is it possible to detect whether an ASP.NET Page is about to be cached and if so, how?The HttpCachePolicy object provides only set-methods. The VaryByParams name-value collection is useless if values other than "None" and "*" are set as it impossible to enumerate them and you can only access them by key
View 1 Replies
Jan 14, 2010
I am developing a website in ASP.NET and I am using various javascript frameworks/libraries. The different files belonging to these frameworks/libraries rarely changes thus there is no reason to refresh those files once they have been sent to the client browser (atleast not everytime a page is served).I see that the HttpContext object can be used somehow, that I can set the content expiration on the files/folders on the IIS, or maybe setup somekind of caching in the web.config file. 1. What is best practice/what approach should I take
View 2 Replies
Oct 22, 2010
Not really sure how to do this but i can cache the dictionary like this:
Cache.Insert("CacheName", Dictionary)
need some direction. the dictionary is two string values taken from a database. The user will input a string and i need to compare it against the values in the cached dictionary.
View 2 Replies
May 8, 2010
I'm having an issue when using the Asp.Net Cache functionality. I add an object to the Cache then at another time I get that object from the Cache, modify one of it's properties then save the changes to the database.
But, the next time I get the object from Cache it contains the changed values. So, when I modify the object it modifies the version which is contained in cache even though I haven't updated it in the Cache specifically. Does anyone know how I can get an object from the Cache which doesn't reference the cached version?i.e.
Step 1:
Item item = new Item();
item.Title = "Test";
Cache.Insert("Test", item, null, DateTime.Now.AddHours(1), System.Web.Caching.Cache.NoSlidingExpiration);
Step 2:
Item item = (Item)Cache.Get("test");
item.Title = "Test 1";
Step 3:
Item item = (Item)Cache.Get("test");
if(item.Title == "Test 1"){
Response.Write("Object has been changed in the Cache.");
}
I realise that with the above example it would make sense that any changes to the item get reflected in cache but my situation is a bit more complicated and I definitely don't want this to happen.
View 2 Replies
Dec 17, 2010
I read few xml files from a location and cache them using Http context cache. Anytime the xml files changes i have to do a IISReset to view the latest changes.
I use this
System.Web.HttpContext.Current.Cache
I have to use the caching as i don't want to read all the xml files all the time. i read it once and caches them for a day. They get reset whenever apppool recyles or anyone manualy do a IISReset.
Is there anyway in asp.net to invalidate the cache if someones changes the xml file.
View 1 Replies
May 3, 2010
My web page is still displaying a previously cached versions of the page. I have this in the page_load event:
Response.Clear();
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1;
Response.CacheControl = "no-cache";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
I have this in the Page_Init:
protected void Page_Init(object Sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
}
View 2 Replies
Apr 19, 2010
There are certain tables that get called often but updated rarely. One of these tables is Departments. So to save DB trips, I think it is ok to cache this table taking into consideration that the table has very small size. However, once you cached it an issue of keeping the table data fresh occurs. So what is the best way to determine that the table is dirty and therefore requires a reload and how that code should be invoked. I look for solution that will be scalable. So updating the cache on single right after inserting will not resolve the issue. If one machine inserted the record all other on the farm should get notified to reload the cache.
View 3 Replies
Dec 23, 2010
The Stylesheet in the App_Theme folder gets cached in the browser. What should be the approach? so that whenever there is a new deployment the browser should take the latest stylesheets and not the one cached in the browser.
This was happening for other css(which are not in theme folder) too, so used custom control as mentioned in the link
[URL]
How this could be done for the CSS in the Theme folder?
Edit: The theme name is mentioned in the web.config as mentioned below. so its not just the html link tag which I had solved by using the method mentioned in the link.
<pages styleSheetTheme="Default">
<controls>
</controls>
</pages>
View 3 Replies
Feb 21, 2011
I would like to ask if there is a way to prevent Firefox from caching scripts (.js files).
I have a project (ASP.Net Web App) with caching issue on firefox. When I first run the application (script is being cached on firefox) and modify the script and rerun the application, firefox is using the cached script instead of the updated one.
I'm using Firefox 3.6.13.
I already tried using HttpHeaders but it seems like firefox is ignoring my codes.
Here is my code:
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false);
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
HttpContext.Current.Response.Cache.SetNoStore();
I tried placing this code at global.asax > Application_BeginRequest and at MasterPage.aspx.cs > Page_Load, but it isn't working.
View 3 Replies
Mar 6, 2010
Lets say you have a page with headers that tell the browser not to cache.Also, this page has already been posted back to itself.Now you hit the refresh button and you click cancel on the IE modal box with the "previously submitted..." message.You get "Webpage has expired". This doesn't happen in FF or Chrome.Is there a way to prevent the "Webpage has expired" message in IE?Since the page isn't cached, I guess IE has nothing to render.But if the page isn't cached and FF and Chrome shows it, I guess they just show the page as previously shown?
View 1 Replies
Jul 16, 2010
"Firstly check if "default.aspx" page is cached on the browser or not; if yes then Response.Redirect("default1.aspx"); else Response.Redirect("default2.aspx")
View 5 Replies
May 21, 2010
I am running into an odd problem, and this is the only thing I can think of. I'm storing a list in cache, and I am randomly losing items from my list as users use the site. I have a class that is called that either goes to cache and returns the list from there, or if the cache is over a certain time frame old, it goes to the database and refreshes the cache. So when I pull the data from cache, this is what it looks like....
results = (List<Software>)cache["software"];
And then I return results and do some processing, filter for security, and eventually it winds up on the screen. For each Software record, there can be multiple resources attached to it, and based on how the security goes they may see some, all, or none of the records. So in the security check it will remove some of those resources from the software record.So my question is.... when I return my results list, is it a reference directly to the cache object? So when I remove a resource from the software object, it is really removing from cache as well? If that is the case, is there any way to not return it as a reference?
edit: I think I may have just answered my own question.... so if I do something like this:
results = new List<Software>((List<Software>)cache["software"]);
it will copy the cached list to my results list, correct?
View 1 Replies
Jan 20, 2011
How do I remove all of the pages I have placed in the output cache? I know you can use
HttpResponse.RemoveOutputCacheItem to remove a single page but how do I "clear" it, i.e. removing ALL pages?
View 5 Replies