views:

10

answers:

0

Is there a way to use output caching with a user control that is themed?

Whenever I add the directive to my usercontrol I get this parser error:

The 'ID' property of a control type ASP.controls_hotcontent_ascx cannot be applied through a control skin.

The Error-source shows the skin-file for the usercontrol.

Here's the directive in the ascx:

<%@ OutputCache Duration="30" VaryByParam="none" %>

Here's the content of the skin-file:

<%@ Register Src="~/Controls/HotContent.ascx" TagName="HotContent" TagPrefix="uc" %>
<uc:HotContent runat="server" TitleLength="67" ItemCount="5" SkinID="1" />
<uc:HotContent runat="server" TitleLength="67" ItemCount="5" SkinID="2" />

What am I doing wrong? Or is this simply not possible?