User control and output cache

M

Marcin

Hello,

I already posted this question on aspnet.caching - but this group
seems to be more active.


I have created a navigation control that highlights current path based
on the URL (works ok).

In order to speed it up I declared the output caching inside my
navigation control.

5 seconds just for a test...
<%@ OutputCache Duration="5" VaryByParam="none" %>

The control is loaded to my template page through "LoadControl"
method.

The problem is that it does not care what is the current page name and
reuses the cached output across multiple pages.

Is there any way to indicate that cached control should have a unique
instance per page?


Thank you a lot for help !

Best regards
Marcin
 
M

Marcin

Hello,

Issue solved (used VaryByCustom attribute and method inside Global.asax.cs class)

Regards
Marcin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top