我有一个page1.aspx页面:
<%@ Register src="uc1.ascx" tagname="UcHead" tagprefix="uc1" %>
使用OutputCache
缓存uc1.ascx:
<%@ OutputCache Duration="18000" VaryByParam="*" %>
如何在另一个page2.aspx页面上点击按钮以移除uc1.ascx或page1.aspx的OutputCache?
当OutputCache在page1.aspx中时,我可以使用以下代码来移除OutputCache:
string url = "/page1.aspx";
HttpResponse.RemoveOutputCacheItem(url);
但是当OutputCache在uc1.ascx中时,它无法正常工作。