Output caching of Menu Control

Discussion in 'ASP .Net Web Controls' started by PugV, Jul 12, 2005.

  1. PugV

    PugV Guest

    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>
    PugV, Jul 12, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hypo
    Replies:
    6
    Views:
    399
  2. Troy Simpson

    Fragment Caching inside page caching?

    Troy Simpson, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    773
    Troy Simpson
    Jan 19, 2004
  3. Welman Jordan
    Replies:
    2
    Views:
    561
    Welman Jordan
    May 27, 2004
  4. Ben Fidge
    Replies:
    0
    Views:
    427
    Ben Fidge
    Jul 5, 2006
  5. JimLad
    Replies:
    3
    Views:
    905
    JimLad
    Jan 21, 2010
Loading...

Share This Page