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?
What you need is VaryByControl. See
Vary by control properties using PartialCaching in ASP.NET
for details.