473,657 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems with caching after the browser is shut

Hi

Not sure if this the right group or not but here it goes.

Here is a part excerpt of my code in the Page_Load Event

'Create cache if the cache object doesn't exist yet
If IsNothing(Cache .Get("dsAllResu lts")) Then

' Use various SelectCommand to fill the 4 SqlAdapters

' Add all tables to a single data set
dsAllResults.Ta bles.Add(Client )
dsAllResults.Ta bles.Add(Calend ar)
dsAllResults.Ta bles.Add(Result )
dsAllResults.Ta bles.Add(Remedy )

' Cache Data Set for 5 minutes
Cache.Add("dsAl lResults", dsAllResults,
Nothing, DateTime.MaxVal ue, _
System.TimeSpan .FromMinutes(in tCacheTimeout), _
Caching.CacheIt emPriority.Defa ult, Nothing)
Else
dsAllResults = Cache("dsAllRes ults")

End If
If Not (IsPostBack) Then
' Bind the client dropdown
drpClient.Items .Clear()

If Not (drpClient.Sele ctedItem Is Nothing)
Then
drpClient.Selec tedItem.Text = ""
drpClient.Selec tedItem.Value = ""
drpClient.Selec tedItem.Selecte d = False

End If

drpClient.DataS ource = dsAllResults.Ta bles
("Client")
drpClient.DataV alueField = "ClientID"
drpClient.DataT extField = "Name"
drpClient.DataB ind()
drpClient.Items .Insert(0, "")

End If
End Sub

This all works fine and has made the page run much
faster , the problem i have is if some one has shut the
browser down and they re-open it again.

The page loads again and opens from the cache fine but
when it gets to this point things go funny.

drpClient.DataS ource = dsAllResults.Ta bles("Client")
drpClient.DataV alueField = "ClientID"
drpClient.DataT extField = "Name"
drpClient.DataB ind()
drpClient.Items .Insert(0, "")

Up until drpClient.DataB ind() everything is fine, as soon
as stepped over drpClient.DataB ind() the drpClient
already has the following properties already set.

drpClient.Selec tedItem.Text = "Client Name"
drpClient.Selec tedItem.Value = "156"
drpClient.Selec tedItem.Selecte d = True

These are always the last selected client from the drop
down even after the browser is shut.

Has anybody had anything like this before , is the
autopostback on the dropdown updating the cache in
anyway , i'm at my wits end on this.

If anybody can help it would be most appreciated.
Thanks & Regards


Neil Cooper
Nov 19 '05 #1
2 998
I think you want to be putting those values into the session and not the
cache. I think the cache is for the whole application. I would check but my
msdn search feature keeps crashing (reboot time.)
Nov 19 '05 #2
Yes, I checked and cache is almost the same as the application cache. This
means that the data will shared for all users and expires only when the
application is recycled.

"Scott Simons" wrote:
I think you want to be putting those values into the session and not the
cache. I think the cache is for the whole application. I would check but my
msdn search feature keeps crashing (reboot time.)

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7173
by: Dave Griffiths | last post by:
Hi all Very new to JavaScript, I am trying to cache a number of images as the page loads, is there a max number of images or memory usage before the browser stops caching. My PC has 1G ram so if it's a physical memory constraint then I think I am away from that. I am trying to cache about 600K images, (this if for an intranet so the page load time is fast) but I need the speed of cached images for the page to work correctly. I seem to...
7
11643
by: Matt Kruse | last post by:
This is a typical layout, but I have specific requirements. I'm trying to figure out a) if it's possible to meet the requirements and b) if so, how. +---------------+ | header | +---------------+ | body | | (scrollable) | +---------------+ | footer |
5
3129
by: R. Ian Lee | last post by:
I have an ASP.NET page that spawns a popup window using javascript's window.open. This works fine. It pops up, you enter some data, press save and everything saves as it should. But, if you click the button to open the popup again, then it opens with the values that were in it before the "save" was executed. I've determined that the problem is that IE is storing the page in it's local temporary internet files cache and isn't going to...
13
1645
by: tshad | last post by:
How do we handle Caching in IE? It seems that my system works fine in Mozilla and Netscape when I make changes. But in IE the changes are not brought across when someone has been to the site before. If they have been here before and hit the same page, the old page is rendered which will cause errors as things that are expected with the new changes are not being done, such as session cookies being created or updated.
12
1643
by: Ken Varn | last post by:
Is there anyway within my web application that I can have all browser caching turned off for all aspx pages sent by my IIS server? I need to have all caching off in order for certain things to work properly, and I can't always rely on the user disabling their cache settings at the browser level. -- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc.
2
8212
by: lanem | last post by:
I am working on a ASP.NET 2.0 web site that has some PDFs that users can download. I'm using an HTTP module to see if the user has permission to view the PDF before loading it. This all works great. The problem is that once the PDF has been allowed through to the browser, it won't be denied to the next user. So, if one user is allowed to see it and then a user who is not allowed to see it uses the same browser, it comes through for...
6
1919
by: Jim Steinberger | last post by:
Hey all - my inaugural post, I have a Java web application on Tomcat 5 using pg73jdbc3.jar to connect to PostgreSQL 7.3.4 running on the same server (Red Hat Linux ). I have a Perl script that drops the database and rebuilds it with all of our
14
11882
by: rolfejr | last post by:
I am trying to display a PDF in the users browser that is pulled from a binary field in our database, and keep that PDF from caching on the client computer. I can successfully pull the PDF and display it using the following code: Response.ContentType = "application/pdf" Response.BinaryWrite objRS("Attachment") where objRS("Attachment") is a reference to the binary field retrieved from the database. However, I have tried adding...
2
1347
by: Tomasz | last post by:
Hello, i have following lines in my Page_Load: Response.Expires = -1; Response.AppendHeader("Pragma", "no-cache"); Response.Cache.SetNoStore(); Response.Cache.SetCacheability(HttpCacheability.NoCache); I'm running this page additionally with dummy parameter:
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.