Hi,
This thing is driving me nuts. I have a UserControl that is called WebUserControl.
I need to cache this control, so I put the following in the WebUserControl.ascx:
<%@ OutputCache Duration="240" VaryByParam="FeedName" %>
Then I have the Default.aspx file in which I have:
<div class="divInnerLeft" id="L1" runat="server">
<uc1:WebUserControl FeedId="a1" ID="a1" runat="server" FeedName=""/>
</div>
<div class="divInnerMiddle" id="M1" runat="server">
<uc1:WebUserControl FeedId="a3" ID="a3" runat="server" FeedName=""/>
</div>
In the Page_Load event I set the FeedName property - according to the user preferences.
The problem is that after initially loading the page, the controls are generated OK. But then, in the Page_Load event they are not available again. So the a1 and a3 are null and I cannot set the FeedName for different user.
How to solve this?
Thanks!