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>
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>