473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Caching a user control

I have a user control that is used on many of our web pages. I'd like to
cache it so that it doesn't have to be recreated for each page. The syntax
below only caches the User Control for each page that uses it. I want it
cached for ALL pages that use it plus for all concurrent sessions.

Is there a way to do this? Thanks in advance.
-Mark

<%@ OutputCache Duration="120" VaryByParam="None" %>
Nov 18 '05 #1
1 1016
Hi Mark:

Add:

Shared="true"

to the @ OutputCache directive. The default value is false. By setting
the value to true the cached user control output can be accessed by
multiple Web Forms pages.

HTH,

--
Scott
http://www.OdeToCode.com

On Tue, 24 Aug 2004 08:16:29 -0500, "Mark"
<mf****@idonotlikespam.cce.umn.edu> wrote:
I have a user control that is used on many of our web pages. I'd like to
cache it so that it doesn't have to be recreated for each page. The syntax
below only caches the User Control for each page that uses it. I want it
cached for ALL pages that use it plus for all concurrent sessions.

Is there a way to do this? Thanks in advance.
-Mark

<%@ OutputCache Duration="120" VaryByParam="None" %>


Nov 18 '05 #2

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

Similar topics

15
by: olle | last post by:
Hi folks. I learning asp.net and compare it with traditional asp and Access-developing. The issue is this one: 1/I have this Ms Acceess adp-project application that works fine on my Ms Sql...
0
by: quique | last post by:
Hi I,m gonna explain my scenario problem: I've got an user control that i want to cache in diferent pages attending to the value of a parameter x, to make t possible i put the next directive in...
3
by: Janaka | last post by:
Hi All, I'm having a problem with Page Output caching on a page that contains a DataGrid. Basically the page pulls up some data for sales information from the DB. Some of this has to be...
0
by: Jeff Schaefer | last post by:
What I want to know is this: Is it possible to programmatically manipulate a custom property of a user control for which <%@ OutputCache ... > has been included? If so, then how? My brief code is...
3
by: DC | last post by:
Hi, (ASP.Net 1.1) is it possible to (programmatically and globally) deactivate page fragment caching? We have only two scenarios, development stage where we want caching off and testing where we...
0
by: Chris | last post by:
I've been playing with the fragment caching and it seems to work fine. I have a user control that I set to cache. The user control has a few text boxes and a drop down list box populated from a...
2
by: serge calderara | last post by:
Dear all, I have heard and read that fragment caching is used to cache a part of a web page in order to get remaining items vivible on the page. For example if a database querry is quite long,...
1
by: Ben Fidge | last post by:
What are best practices for page output caching on pages that are dynamically generated from database tables. Our site has left-hand navigation that is comprised of dynamically generated menus...
1
by: Ben Fidge | last post by:
I've got a User Control that renders site navigation from a database. For some reason, when using Output Caching, none of my LinkButtons fire their PostBack events. The declaration in the...
0
by: helveticus | last post by:
I have a master/details configuration that includes multiple user controls. The details page is configured to cache data via VaryByCustom. This works fine. One of the user controls contains an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.