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

Problems caching user contorl on page

My default page stays constant in the site and all the content in the body
of the page is produced with user controls in a table cell for the body
section. The main function of this site is a products catalogue and the
products show in a datagrid in one of the user controls. This datagrid has
many rows and columns of images and this is what I'm most interested in
caching.

If I put
<%@ OutputCache Duration="500" VaryByParam="MenuID" Location="Client" %>
in the top of the ProductsListing user control then the default page gets
cached and when I click on a menu which should repopulate the datagird, it
shows the home page user control instead. I figured that putting this tag
on the user control just confused things, to the I put in on the top of the
default page and things behaved as though nothing was being cached. The
"MenuID" param is what gets passed into the default page where in the code
behind gets passed to the user control to populate the grid according to the
menu ID.

Can anyone offer some help on how to cache different versions of a user
control according to the param value?

--
mo*******@nospam.com
Nov 18 '05 #1
2 1486
Hi Moondaddy,

From your description, you used some certain UserControls on a certain web
page. And you use Caching on those UserControls but found it not work as
expected, yes?

It seems that your page strucutre is abit complex. Would you create a
simple page and use few UserControls on it and test whether this problem
can be repro. Also, it'll be most helpful if you can provide some demo
code on this issue.

In addition ,here are some related reference in MSDN:

#Caching Multiple Versions of a User Control Based on Parameters
http://msdn.microsoft.com/library/en...ingmultiplever
sionsofusercontrolbasedonparameters.asp?frame=true

#Caching Multiple Versions of a User Control by Using Declarative Attributes
http://msdn.microsoft.com/library/en...ingmultiplever
sionsofusercontrolusingdeclarativeattributes.asp?f rame=true

Hope this will help you. Also, if you have any new findings, please feel
free to post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


Nov 18 '05 #2
Hi Moondaddy,

Have you got any progressed on this issue? If there is anything we can
help, please feel free to post here.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3

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

Similar topics

0
by: jawahar Rajan | last post by:
All, I have a default setting of Response.Expires = 1200 is this 20 minutes? or 1200 minutes? The problem I have is say user1 log-in to the web site, and is a valid user, then I display on each...
0
by: Zi | last post by:
I have a user control within a data grid. I am binding the user control to one of the values from the data grid. The data grid implements paging. It is all working ok for the first page but once i...
0
by: Troy Simpson | last post by:
Hi, I have a website which is made up of dynamic pages. Each page that's loaded has some code which looks at which template to load amongst other things, which causes the page to take a little...
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...
2
by: moondaddy | last post by:
My default page stays constant in the site and all the content in the body of the page is produced with user controls in a table cell for the body section. The main function of this site is a...
13
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...
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...
3
by: =?Utf-8?B?TWlndWVsIElzaWRvcm8=?= | last post by:
Hi, I have an ASP.NET 2.0 application that allows content search. Search is included in all pages and a cross postback to the search results page is performed with the text inserted by the user....
6
by: alun65 | last post by:
I'm having trouble programmatically adding a user control and then setting some of it's server controls. I add the user control to the code behind and add it to a placeholder: protected void...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.