Output caching of Menu Control

P

PugV

I have wraped the menu control in a user control and wanted to set output
cachinging to vary by parameter. the problem is that whenever the page gets
the cached version of the control all the formating for the menu (defined in
the various item styles) is gone. It appears just with no formating applied.
Is there any way to get this control to properly behave in a cached user
control?

Here is the code.

<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="CategoryMenuControl.ascx.cs" Inherits="WebUserControl" %>
<div align=center nowrap >
<asp:Menu ID="myMenu" runat="server" DisappearAfter="1000" Font-Bold="True"
Font-Names="Verdana"
Font-Size="10pt" ForeColor="White" MaximumDynamicDisplayLevels="8"
Orientation="Horizontal" Width="100%" DataSourceID="SiteMapDataSource1"
EnableViewState="False">
<StaticMenuItemStyle BackColor="SteelBlue" BorderColor="WhiteSmoke"
BorderStyle="Outset"
BorderWidth="1px" ForeColor="White" HorizontalPadding="2px"
ItemSpacing="1px"
VerticalPadding="2px" />
<DynamicMenuItemStyle BackColor="SteelBlue" BorderColor="WhiteSmoke"
BorderStyle="Outset"
BorderWidth="1px" ForeColor="White" HorizontalPadding="2px"
ItemSpacing="1px"
VerticalPadding="2px" />
<DynamicHoverStyle BackColor="LightSteelBlue" BorderColor="WhiteSmoke"
BorderStyle="Inset"
ForeColor="Red" />
<StaticHoverStyle BackColor="LightSteelBlue" BorderColor="WhiteSmoke"
BorderStyle="Inset" />
<DynamicMenuStyle BackColor="SteelBlue" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"
EnableViewState="False" ShowStartingNode="False"
SiteMapProvider="categorySiteMapProvider" />
<asp:HiddenField ID=GetGeography runat=server Visible="False" />
<asp:HiddenField ID=GetLanguage runat=server Visible="False" />
</div>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top