473,881 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

caching user control's output by property

Hi,

i'm writing a user control that lives inside a page,
and i want to cache the output of the control.
is it possible to cache the control's output using a property on the
control.
so that when the property is like the property of the cached data, the
cached data is being outputed.
if the property is not in the cache already, a new data is outputed.

it is very similar to the VaryByParam, but the parameter is not from
outside, it is from the page itself.
is it possible?

TIA, z.
Nov 18 '05 #1
1 1027
Hi z.f.: Have you looked at VaryByControl ?

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

On Mon, 25 Oct 2004 16:27:46 +0200, "z. f."
<zi**@info-scopeREMSPAM.co .il> wrote:
Hi,

i'm writing a user control that lives inside a page,
and i want to cache the output of the control.
is it possible to cache the control's output using a property on the
control.
so that when the property is like the property of the cached data, the
cached data is being outputed.
if the property is not in the cache already, a new data is outputed.

it is very similar to the VaryByParam, but the parameter is not from
outside, it is from the page itself.
is it possible?

TIA, z.


Nov 18 '05 #2

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

Similar topics

3
1650
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 calculated on the fly when the request is made, and so I thought it would be ideal to cache the page for a set amount of time. I've placed the following at the top of my page: <%@ OutputCache Duration="160" VaryByParam="None" %> Now the problem is...
0
1323
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 at the end of this message. The Microsoft documentation is a bit confusing to me. The following numbered sentences appear in the .NET Framework Developer's Guide article titled "Caching Portions of an ASP.NET Page": 1. You can declare an ID...
2
1359
by: Welman Jordan | last post by:
Hello, I met with a tough problem when making my pages. Please help. To make the problem short, i write down what i want here first, and then explain my situation in details. How can I acchieve this: Only one Page_Load, and then the output of the control is cached within the Cache, accessible via a programatically generated
3
2494
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 want caching on. Is this doable? I think there is a config switch in 2.0, anything in 1.1? TIA for any hint,
0
1209
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 table. When I turn caching on I find there to be a problem with viewstate. Each of the controls have viewstate enabled, but it appears that viewstate does not retain or insert the user's inputed or selected values back into the text boxes or...
1
997
by: z. f. | last post by:
Hi, i'm writing a user control that lives inside a page, and i want to cache the output of the control. is it possible to cache the control's output using a property on the control. so that when the property is like the property of the cached data, the cached data is being outputed. if the property is not in the cache already, a new data is outputed.
1
1349
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 of product categories. The categories are taken from several database tables which rarely change. This left-hand navigation is included on every single page in the site and as such is wrapped up in a user-control. However, when I enabled caching...
6
2766
by: Rolf Welskes | last post by:
Hello, I want to partial cache by using a UserControl. Now I have a file dependency. In msdn I see it is not possible to do it the same way as in a page. The only information is to create a file dependency and assign it to Dependency property.
5
1328
by: Erik Lautier | last post by:
I have two subroutines that are running on virtually every page of my site; it's an if/then/else situation where one runs if the user is registered and the other runs if the user is a guest. I have two questions: 1. Since they're on virtually every page, I know that registering them in a .ascx control will simplify things, but will it actually speed my pages up? 2. If I go ahead with #1, can I cache the control page and get the
0
9926
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
9776
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
10400
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...
0
9552
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7108
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();...
0
5780
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4597
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
2
4194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.