G
Guest
I have a quite strange problem with the Menu control.
I have ten languages and each language has a SiteMapDataSource and a Menu.
For better performance, I am creating a hashtable (language -> (Menu,
SitemapDataSource)) and holding this hashtable in the Cache object.
On each page request, I am inserting the menu corresponding to the specified
language to page. Hence, DataBinding is only done once per each language
(when inserting the Menu in the hashtable).
This works fine for several page requests. However, after approx. 9 page
requests (for different languages), the menu gets messed.
I have analysed the output of one and the same page for the working and the
not working case. I found out that in the not working case, the code rendered
by the menu control refers styles not declared in that page (styles that are
declared in the working page).
Rendered styles / html in Working case:
=======================================
<style type="text/css">
.SiteMenu4_0 {
background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
.SiteMenu4_1 { text-decoration:none; }
.SiteMenu4_2 { border-style:None; }
.SiteMenu4_3 { border-style:none; }
.SiteMenu4_4 { }
.SiteMenu4_5 { }
.SiteMenu4_6 { border-style:none; }
.SiteMenu4_7 { }
.SiteMenu4_8 { }
.SiteMenu4_9 { border-style:none; }
.SiteMenu4_10 { }
.SiteMenu4_11 { border-style:none; }
.SiteMenu4_12 { }
</style>
html e.g.
<table id="SiteMenu4" class="SiteMenu StaticMenuStyle SiteMenu4_5
SiteMenu4_2" cellpadding="0" cellspacing="0" border="0">
<tr>
<td onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(this)" id="SiteMenu4n0"><table class="StaticMenuItemStyle
SiteMenu4_4" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><a class="SiteMenu4_1 StaticMenuItemStyle SiteMenu4_3" href="#"
style="border-style:none;font-size:1em;cursor:text;">O firmie dummy</a></td>
</tr>
</table>
Rendered styles / html in NOT Working case:
===========================================
<style type="text/css">
.SiteMenu4_26 {
background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
.SiteMenu4_27 { text-decoration:none; }
.SiteMenu4_28 { border-style:None; }
.SiteMenu4_29 { border-style:none; }
.SiteMenu4_30 { }
.SiteMenu4_31 { }
.SiteMenu4_32 { border-style:none; }
.SiteMenu4_33 { }
.SiteMenu4_34 { }
.SiteMenu4_35 { border-style:none; }
.SiteMenu4_36 { }
.SiteMenu4_37 { border-style:none; }
.SiteMenu4_38 { }
</style>
html e.g.
<table id="SiteMenu4" class="SiteMenu StaticMenuStyle SiteMenu4_5
StaticMenuStyle SiteMenu4_5 StaticMenuStyle SiteMenu4_5 SiteMenu4_28"
cellpadding="0" cellspacing="0" border="0">
<tr>
<td onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(this)" id="SiteMenu4n0"><table class="StaticMenuItemStyle
SiteMenu4_4" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><a class="SiteMenu4_1 StaticMenuItemStyle SiteMenu4_3" href="#"
style="border-style:none;font-size:1em;cursor:text;">O firmie REMS</a></td>
</tr>
</table>
==> As you can see, the class if "SiteMenu4" contains three times
StaticMenuStyle SiteMenu4_5 followed by SiteMenu4_28" .
I expected
SiteMenu4_31 followed by SiteMenu4_28
Any suggestions what is going wrong?
I have ten languages and each language has a SiteMapDataSource and a Menu.
For better performance, I am creating a hashtable (language -> (Menu,
SitemapDataSource)) and holding this hashtable in the Cache object.
On each page request, I am inserting the menu corresponding to the specified
language to page. Hence, DataBinding is only done once per each language
(when inserting the Menu in the hashtable).
This works fine for several page requests. However, after approx. 9 page
requests (for different languages), the menu gets messed.
I have analysed the output of one and the same page for the working and the
not working case. I found out that in the not working case, the code rendered
by the menu control refers styles not declared in that page (styles that are
declared in the working page).
Rendered styles / html in Working case:
=======================================
<style type="text/css">
.SiteMenu4_0 {
background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
.SiteMenu4_1 { text-decoration:none; }
.SiteMenu4_2 { border-style:None; }
.SiteMenu4_3 { border-style:none; }
.SiteMenu4_4 { }
.SiteMenu4_5 { }
.SiteMenu4_6 { border-style:none; }
.SiteMenu4_7 { }
.SiteMenu4_8 { }
.SiteMenu4_9 { border-style:none; }
.SiteMenu4_10 { }
.SiteMenu4_11 { border-style:none; }
.SiteMenu4_12 { }
</style>
html e.g.
<table id="SiteMenu4" class="SiteMenu StaticMenuStyle SiteMenu4_5
SiteMenu4_2" cellpadding="0" cellspacing="0" border="0">
<tr>
<td onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(this)" id="SiteMenu4n0"><table class="StaticMenuItemStyle
SiteMenu4_4" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><a class="SiteMenu4_1 StaticMenuItemStyle SiteMenu4_3" href="#"
style="border-style:none;font-size:1em;cursor:text;">O firmie dummy</a></td>
</tr>
</table>
Rendered styles / html in NOT Working case:
===========================================
<style type="text/css">
.SiteMenu4_26 {
background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
.SiteMenu4_27 { text-decoration:none; }
.SiteMenu4_28 { border-style:None; }
.SiteMenu4_29 { border-style:none; }
.SiteMenu4_30 { }
.SiteMenu4_31 { }
.SiteMenu4_32 { border-style:none; }
.SiteMenu4_33 { }
.SiteMenu4_34 { }
.SiteMenu4_35 { border-style:none; }
.SiteMenu4_36 { }
.SiteMenu4_37 { border-style:none; }
.SiteMenu4_38 { }
</style>
html e.g.
<table id="SiteMenu4" class="SiteMenu StaticMenuStyle SiteMenu4_5
StaticMenuStyle SiteMenu4_5 StaticMenuStyle SiteMenu4_5 SiteMenu4_28"
cellpadding="0" cellspacing="0" border="0">
<tr>
<td onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(this)" id="SiteMenu4n0"><table class="StaticMenuItemStyle
SiteMenu4_4" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><a class="SiteMenu4_1 StaticMenuItemStyle SiteMenu4_3" href="#"
style="border-style:none;font-size:1em;cursor:text;">O firmie REMS</a></td>
</tr>
</table>
==> As you can see, the class if "SiteMenu4" contains three times
StaticMenuStyle SiteMenu4_5 followed by SiteMenu4_28" .
I expected
SiteMenu4_31 followed by SiteMenu4_28
Any suggestions what is going wrong?