It seems to me that
Response.Cache.SetVaryByCustom("mykey");
is not working from within ASCX User Controls. It works from the Page. The ASCX works only when VaryByCustom is specified in the outputcache directive.
I’m using ASP.NET 3.5.
Any help?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might consider expressing it as a directive at the top of the ascx:
Response is a property of Page, not of the control, so it’s possible that it has no effect at the control level.