473,425 Members | 1,561 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,425 software developers and data experts.

specify output cache settings in the codebehind???

Ok there are two ways to specify output cache settings for the user
control.

1) using attributes

[PartialCaching(20)]
public class ctlMine : UserControl{}

2) and using @ OutputCache directive.

They both are "static". Now if I need to load a user control into
various pages and specify particular output caching settings per page,
how do I do this? What is the way to set it in the codebehind using
variables for cache duration, etc.

I can create a class:
System.Web.UI.PartialCachingAttribute cacheRules = new
System.Web.UI.PartialCachingAttribute(CacheDuratio n, null, null, null);
but how to I attach it to the control?

Thanks.

Nov 19 '05 #1
0 1093

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

Similar topics

21
by: Bill H | last post by:
I have a routine that displays 60 items (with thumbnails) per page. You can click any item and displays a new page with item details. When the user back pages it runs the query again to display all...
7
by: A.M | last post by:
Hi, How can I change the duration of user control's cache inside asp.net's C# code? Any help would be apprecited, Alan
2
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...
9
by: darrel | last post by:
I'm accessing an XML file several times on a page, and, as such, want to cache it. I'm setting it up as such: if cache("xmlFile") is nothing then... load file cache file else read it
0
by: thinkfr33ly | last post by:
Is there any way, either via an ASHX file or lines in a code behind, to enable output caching for an HTTP Handler? This is driving me nuts. Nothing I try works. I've tried this in the...
0
by: dg | last post by:
Greeting! We are using System.Web.Caching.Cache for our MCMS web application. I am using Cache.Insert () and Cache.Remove(). We are refreshing the cache when it is required. But once in a while...
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...
3
by: Sally Sally | last post by:
I have a very basic question on the two parameters shared buffers and effective cache size. I have read articles on what each is about etc. But I still think I don't quite grasp what these settings...
10
by: linhardt | last post by:
I am wondering how to make ASP.NET output XML instead of HTML. Here is my situation: I am using IE as a front-end to browse company documents. Let's say, a user wants a Word document called...
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
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
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...
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.