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

Caching user controls - problem with multiple users?

The background to my problem:

I have constructed a small web application. Each page of that web
application contains a small user control I made, that has three sections:

1) imgCompany (of type ImageButton)
My company's logo

2) imgCustomer (of type ImageButton)
The customer company's logo. The ImageUrl property changes according to the
user that is logged in...i.e. if customer is from Company A then Company A's
logo is displayed. If customer is from Company B then Company B's logo is
displayed, and so on.

3) A set of menu options that show and hide themselves according to the
prev. permissions of the user that logged in.

This needs to be shared across all pages in the site.

I thought that setting my @OutputCache directives to the following:
Directive="500"
VaryByControl="imgCustomer"
Shared="true"

would solve my difficulty.
However, in testing situtations, this is what happens:

Customer A logs in. Sees the header appropriate for Customer A. Header is
stored in cache.

Customer B logs in. Sees the header appropriate for Customer *A* (loaded
from cache).

Obviously, I want to cache each instance of the User Control that has a
different setting for imgCustomer.ImageUrl, such that Customer A will see
logo A, and customer B will see logo B. What have I done in error?

Any help would be *greatly* appreciated!

-Justice
Nov 17 '05 #1
0 1076

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

Similar topics

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: Wee Bubba | last post by:
2 questions please: 1. At the moment I make a connection to a database whenever a user logs into my website. I run a few SQL's then store some commonly used dataTables in session objects for...
0
by: Ed | last post by:
Hi all, Have a strange situation regarding fragment caching. I've read the docs and kbs on this so it's either I've missed some key aspect of the implementation or there is a "gotcha" here that...
6
by: onnodb | last post by:
Hi all, While working on an Access UI to a MySQL database (which should be a reasonable, low-cost, flexible interface to the DB, better than web-based, much less costly than a full-fledged .NET...
1
by: mindflower | last post by:
Hi, i have a web application running on multiple web domains. I'm looking for the best way to cache data across these multiple domains. The System.Web.Caching.Cache only supports caching over a...
1
by: Aryan | last post by:
Hi, I have problem related to Caching of data. I am reading large xml file and putting this xml in dataset, since this dataset will contain many datatable's inside. And each datatable might be big...
2
by: Aryan | last post by:
Hi, I have problem related to Caching of data. I am reading large xml file and putting this xml in dataset, since this dataset will contain many datatable's inside. And each datatable might be big...
6
by: John Kotuby | last post by:
Hi all, I am trying to get an ASPX page written in VB and VS 2008 to open more quickly inside of am Iframe in a standard HTML page. One of the things the page does is to allow users to click a...
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
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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,...

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.