J
Joe Fallon
I have a simple user control that I use for the footer of each page.
It has one line of text with things link comapny name and a few hyperlinks
to jump to other pages.
If I want to use partial page caching I could assign this directive to it:
<%@ OutputCache Duration="60" VaryByParam="none" %>
Then as each page renders it should pull the already rendered footer from
cache instead of re-generating it.
My question is:
What if I want to hide some of the links on certain pages? e.g. a Popup page
should not have links on it.
So for those pages I want the footer to be different.
I currently have code in the user control to handle this. But that means I
generate the control for each page.
I would like to know how to cache the user control for both types of
windows - normal and popup.
Obviously, I could build another user control so I could assign the right
one to each window type.
But I am looking for a way to do it with 1 control.
Thanks!
It has one line of text with things link comapny name and a few hyperlinks
to jump to other pages.
If I want to use partial page caching I could assign this directive to it:
<%@ OutputCache Duration="60" VaryByParam="none" %>
Then as each page renders it should pull the already rendered footer from
cache instead of re-generating it.
My question is:
What if I want to hide some of the links on certain pages? e.g. a Popup page
should not have links on it.
So for those pages I want the footer to be different.
I currently have code in the user control to handle this. But that means I
generate the control for each page.
I would like to know how to cache the user control for both types of
windows - normal and popup.
Obviously, I could build another user control so I could assign the right
one to each window type.
But I am looking for a way to do it with 1 control.
Thanks!