我有一个页面,其中有 4 个用户控件。其中1个用于过滤掉其他控件的内容。我在该控件中有复选框,例如按性别过滤,按大小和颜色过滤等....
我在我的页面上添加了以下代码进行缓存。当您像选择性别复选框一样过滤它时,它似乎可以工作 2-3 次,并且它可以工作,如果您选择大小过滤器它可以工作,但是如果您再次选择性别过滤器它不起作用并且其他控件不显示任何结果消息。当我知道有结果时,因为它第一次确实有效。
我在每个过滤器上添加了一个查询字符串参数,以便我可以取回结果。
<%@ OutputCache Duration="300" VaryByParam="*" %>
请求参数
http://somwsite.com/jacktes/?n=0&lp=&hp=&size=&colour=&g=MENS
我试过以下没有运气。
<%@ OutputCache Duration="300" VaryByParam="none" VaryByControl="GenderFilter" %>
<%@ OutputCache Duration="300" VaryByControl="GenderFilter" %> // ID of the checkbox List
<%@ OutputCache Duration="300" VaryByParam="n;lp;hp;size;colour" %> // ID of the querystring param
谁能帮我解决这个问题?
Note: No error message as page works fine BUT out of 4 control the control which shows the filter results is displaying no results.