Caching, Caching,Caching,Caching,Caching Why nobody know???

I have posted this problem quite a few times but never got a decent answer and I have still not found a solution. Every time I have a gridview when the page is refreshed the data in the gridview does not refresh. You might say well and GridView.DataBind() to the pageload method but I think there is a performance problem if you bind your gridviews every time. For example I have a dropdownlist, a gridview and button and the gridview is supposed to refresh depending on the value in the dropdown when the button is pushed. if you click on the button the gridview data does not change unless you change the value of the dropdown. This is annoying if user is looking for a refresh of the same set of data. Again I know on Button click I can add a GridView.DataBind() but This is only one situation and there are literally hunderds. I have also added Response.Cache.SetCacheability(HttpCacheability.NoCache) to the master page but it did not help. I think somewhere something is turned on to cache the data for the gridview but I am not sure where.

 Any How, Is there a global way to make sure all gridviews in an application get refreshed every time without adding a GridView.DataBind() for every situation and every page of an application?

 

Thanks,

Mo

1
mhariri
2/21/2007 1:50:53 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
1323 Views

Similar Articles

[PageSpeed] 41

I'm not sure how you think you can get new results from the database without calling DataBind

Further: For example I have a dropdownlist, a gridview and button and the gridview is supposed to refresh depending on the value in the dropdown when the button is pushed. if you click on the button the gridview data does not change unless you change the value of the dropdown

Do you have some kind of check in the button click event that is checking to see if the value of the dropdown is the same as it was before or something? If so, why not just get rid of it? Where are you actually calling DataBind from? You're probably going to have to post some code for us to get a better understanding of this, but as of now I see now way to get new database results without calling DataBind.
0
Rossoneri
2/21/2007 2:59:23 PM
Reply:

Similar Artilces:

To cache or not to cache ?
I am really confused here. What I have are two forms one is where I get metadata for a document and next page where the user uploads the file for that document. What I want is a link from upload page back to the metadata page with the fields still filled in (cached maybe ?) and a link that takes back to that page without cache...In other words..I want two links on upload page one that take users back to the metadata page with fields filled in from previous request and the other link which takes to metadata form with empty fields. I am not sure how to accomplish this. I tried using ca...

To Cache or Not To Cache?
Hello, I'd like the opinion of the community on this question. We've just completed a migration from Exchange 5.5 to GroupWise 7. Migration went well. Right now, everyone is using WebAccess but I am rolling out the GroupWise Windows client (with latest FTFs) along with an updated XP SP2 workstation image shortly, to the office people. They had been using Outlook with Exchange, no caching. We have 6 locations with office people. About 25 are local to the PO server. The other locations, ranging from 25 to 8 per location are connected to the PO server via a T-1 WAN lin...

to cache or not to cache?
i have a toolbar at the top of all my web pages and I am not sure whether it is worth caching or not. this toolbar is in fact a search facility consisting of 4 dropdownlists. 3 of the DDL's are static and 1 is databound. i would like to make the whole toolbar into a user control and cache it. Q1. If one of the DDL's selected item has changed the user control must know not to load from the cache. is it possible to include this kind of logic to a cached user control? Q2. Is it worth caching my toolbar? Or should I just consider caching the 1 databound DDl instead? any help much apprec...

To cache or not to cache
It's a well known fact that it's a good practice to cache results of SQL queries. But here as everywhere we should limit ourselfs and not to cache everything, shouldn't we? ) For example, you know that in facebook you can enter information about yourself - first name, last name, all your schools, jobs and so on. This data changes very rarely. So, as books say this data is perfect to be cached. But, you see, there can be millions of users with there profiles in our cache. So.. to cache or not to cache? )  it is a good practice to use limited size content and low edit freque...

page cached that should not be cached
Hi, Thanks for the support. I'm using ASP.NET 2 but my problem is that I have an asp.net web page called: extractimage.aspx that receive a query string parameter and returns an image, so I call it by: ~/inicio/extractimage.aspx?usu=25 I have a linkbutton in a grid with this link, so I refresh the Grid and the correct image should be shown. But when I change the image in other page and I try to refresh the Grid, the previous image is shown, not the new one. It seems the extractimage.aspx web page is cached and I do not want that, I would like the current image is always displayed, no...

Cache
Hello,could anyone point me to any resource/link/best practice explaining the use of the Sql Server cache used along with the Output cache?Thanks.VB .Net Coder - Apologize my C# nescienceBest Regards. http://beta.asp.net/QUICKSTART/aspnet/doc/caching/SQLInvalidation.aspx-BrockDevelopMentorhttp://staff.develop.com/ballen Hi Brock, If I use Output and SqlServer Cache, what happens? I mean, let's say I set a duration of 60 seconds for the Output Cache, and also I set the Sql Server Cache for a specific table in the same page. If nothing happens to the data of the aforementioned table,...

how to clear out data cache, statement cache and procedure cache?
Hi there, does anyone know is there some commands to to clear out data cache, statement cache and procedure cache? (without recycle database server) And for both ASE 12.5 and ASE 15? we need to run some performance comparsion in ASE 12.5 and ASE 15. I'd make sure the data cache are similar and procedure/statement cache is clear (so cached query plan is not used) for each case. This all depends on the (very) specific version of ASE data cache: ------------ as of 15.0.3 - dbcc cachedataremove(dbid | dbname, objid | objname, partitionid | partitionname, indid | indexname)...

To Cache or Not to Cache...That is the Question
During the design phase of developing an ASP.NET application it is vital developers utilize the ASP.NET Cache feature.  A good “rule of thumb” when deciding when to use the caching feature is when data, pages, parts of pages are used more than once.  More specifically any data that is general in nature and does not change depending on specific user requests is a perfect scenario for caching.  This saves on time and overhead for collecting and creating reusable objects.  However, it is possible to use too much caching.  For example, on a 32-bit application process you...

.Net Caching Ughhhh (Micro-caching)
I'm designing an application where data is continuous and becomes dirty in a matter of seconds. The load is also high and therefore, to avoid straining the database server, i cache all data for a couple of seconds. That's fine. However, some data are HIGHLY VOLATILE and requires the most latest data...for these types of data, I use 1 second caching. I done benchmarks of 1-6 second caching and the benefits on a high load server is enormous. However there is a problem with this micro caching technique.....the problem is...some of the objects get destroyed as soon as it is pulled out. ...

HTTP header Cache-Control: no-Cache
 Can any one help me out why and when we need to set Cache control to NO. and what is the purpose of HTTP header cache control.regards,ZAS If you do not want brower to cache content of your pages, then you need to set this header. Otherwise, browser will try to use what it has in cache. And if it can't find it in cache or if cache has expired, then it will ask for fresh content from page,   N http://www.byteblocks.com   <zeeshangawab> wrote in message news:2965713@forums.asp.net...  Can any one help me out why and when we need to set Cache c...

How does mozilla decide how image being cached in memory cache vs disk cache
Hi, Can you please tell me how does mozilla decide image being cached in memory cache or disk cache? E.g. 1. I clear the cache in firefox 2. I load google.com. All images are cached in disk cache. 3. I load yahoo.com. There are 4 images cached in memory cache and the rest are cached in disk cache. What is the rule that mozilla is using to decide how to cache an image? Thank you. On 5/15/10 3:40 AM, Richard wrote: > 3. I load yahoo.com. There are 4 images cached in memory cache and the > rest are cached in disk cache. > > What is the rule that mozilla is using t...

Difference between System.Web.Caching.Cache and System.Web.HttpContext.Current.Cache
Hi,   Can any one help me to understand the difference between the web caching and teh  httpcontext caching. Which is best to use. Does any one have the some good links on this topic. Thanks in advance for all ur time. System.Web.Caching.Cache: this is the implementation of .NET caching.System.Web.HttpContext.Current.Cache: this is the instance of that implementation, that lives in the application domain.You should use System.Web.HttpContext.Current.Cache for storing your data.More info:How to: Add Items to the Cache:http://msdn.microsoft.com/en-us/library/18c1wd61(VS.80)....

Cache for all users (Global cache)
  I am building a URL rewriter and I need to cache some things. I need this cache to be available for ALL users, like a global cache. I've been looking and found that "HttpContext.Current.Application" might be what i'm looking for, but I want to be sure. I need to store various dictionaries that pull from the database and I will have the cache update every 24 hours. Again, I need the cache to be available to all users when they come to the site. I do not want a cache that will be built for each user when they first hit the site, it has to be built once by any user an...

Recurrence sets and Cache::Cache
I would like to implement some cacheing scheme for the Event:* modules, because complex recurrence set generation may be too slow for some applications, such as for web pages. (We already discussed this sometime ago) Some API ideas: use Cache::FileCache; # from CPAN use DateTime::CachedSet; # name? - new module. my $cache = new Cache::FileCache( %args ); my $events = DateTime::Event::Xxxx->new; my $cached_set = DateTime::CachedSet->new( set => $events, cache => $cache, to_string => \&DateTime::Format::xxx, from_s...

Web resources about - Caching, Caching,Caching,Caching,Caching Why nobody know??? - asp.net.presentation-controls

Resources last updated: 11/21/2015 3:54:13 AM