0

I implement output cache in page but its conflict with base page. In base page I add cookie in preint event

                  HttpCookie currCookie = new HttpCookie("CurrencyId", "3");
                 currCookie.Expires = DateTime.Now.AddDays(1);
                Response.Cookies.Add(currCookie);
                 Request.Cookies.Set(currCookie);

if i comment Response.Cookies.Add(currCookie) line output cache works but if not outputcache not working

user3770459
  • 133
  • 1
  • 1
  • 9

1 Answers1

0

You can't do both. If the page is using output cache then you can't be doing anything that's user specific on it. That defeats the purpose. It can either be cached for all users or not. It can be cached based upon various conditions, such as Param, Control, or Header or a custom function.

Mark Fitzpatrick
  • 1,624
  • 1
  • 11
  • 8