11 Jan 2011
18 May 2011
Link to this post
This MUST have been solved by someone, somewhere, but I can't seem to get around it.
I have a custom control, derived from SimpleView, which renders different content in it's template dependent upon the value inside a cookie. However, the caching kicks in and caches the output of the control on the first load and from then on, even if the cookie changes (and therefore should cause different content to be rendered), the same original content is displayed.
I have tried using the <asp:substitution> control, but this can't access the callback method in the class from within the template file.
I have tried putting <%@ OutputCache Duration="0" %> in the template file, but this has no effect.
To make the desired output show correctly I have switched off the caching on the page, which is not at all ideal as the page is noticably slower without caching.
Any help from some clever person out there would be great.