2013-10-01 27 views
0

我有一個頁面,我有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. 

回答