0

How is it possible to create various cached versions of a user control based on a field within the control. So for example I have a user control that has the following declaration:

int someInt = 0;

Let's say this variable could be set to any value between 1 and 10. If I want a separate cached user control for each value of the variable - how do I achieve this?

Peanut
  • 18,967
  • 20
  • 72
  • 78

1 Answers1

0

What you need is VaryByControl. See

Vary by control properties using PartialCaching in ASP.NET

for details.

Community
  • 1
  • 1
Andreas Paulsson
  • 7,745
  • 3
  • 25
  • 31