Ummm... no.
The Menu control is not suitable for me. Not in this capacity anyway.
Instead, I did it with a custom control based on a horizontal list of anchors and labels. With the Page_Load of the custom control checking the location of the page and then, accordingly (Select Case) assignes the proper attributes to the coresponding menu "button".
Though, I wanted to do it, instead of using Select Case, with a loop of items inside the panel - didn't quite work out.
<
script runat="server">
Sub Page_Load()
Dim strPath As String = Request.ServerVariables("URL")
Dim a() As String
a = strPath.Split(
"/")
dskILS.BackColor = Drawing.Color.Transparent
dskTkna.BackColor = Drawing.Color.Transparent
dskOl.BackColor = Drawing.Color.Transparent
dskMain.BackColor = Drawing.Color.Transparent
dskLog.BackColor = Drawing.Color.Transparent
dskZiud.BackColor = Drawing.Color.Transparent
dskKnl.BackColor = Drawing.Color.Transparent
Select Case a(2)
Case "ILS" : dskILS.BackColor = Drawing.Color.Ivory
Case "default.aspx" : dskMain.BackColor = Drawing.Color.Ivory
Case "תקינה והפעלה" : dskTkna.BackColor = Drawing.Color.Ivory
Case "ארגון ולוגיסטיקה" : dskOl.BackColor = Drawing.Color.Ivory
Case "לוגיסטיקה ייעודית" : dskLog.BackColor = Drawing.Color.Ivory
Case "ציוד כללי" : dskZiud.BackColor = Drawing.Color.Ivory
Case "ניהול מספן" : dskKnl.BackColor = Drawing.Color.Ivory
End Select
End Sub
</
script>
<
div id="top1">
<div style="text-align:right">
<img alt="ענף לוגיסטיקה" src="/taba_web/images/title.gif" />
</div>
<asp:Panel ID="TopMenu" Direction="righttoleft" runat="server">
<a href="/Taba_Web/ציוד כללי/"><asp:Label BorderColor="black" BorderWidth="2px" Width="100px" ID="dskZiud" Text="ציוד כללי" ToolTip="ציוד כללי" runat="server" style="cursor: hand" /></a>
<a href="/Taba_Web/לוגיסטיקה ייעודית/"><asp:Label BorderColor="black" BorderWidth="2px" Width="100px" ID="dskLog" Text="לוגיסטיקה ייעודית" ToolTip="לוגיסטיקה ייעודית" runat="server" style="cursor: hand" /></a>
<a href="/Taba_Web/ניהול מספן/"><asp:Label BorderColor="black" BorderWidth="2px" Width="100px" ID="dskKnl" Text="ניהול המספן" ToolTip="ניהול מספן" runat="server" style="cursor: hand" /></a>
<a href="/Taba_Web/"><asp:Label BorderColor="black" BorderWidth="2px" Width="100px" ID="dskMain" Text="הענף" ToolTip="" runat="server" style="cursor: hand" /></a>
<a href="/Taba_Web/ארגון ולוגיסטיקה/"><asp:Label BorderColor="black" BorderWidth="2px" Width="100px" ID="dskOl" Text="ארגון ולוגיסטיקה" ToolTip="ארגון ולוגיסטיקה" runat="server" style="cursor: hand" /></a>
<a href="/Taba_Web/ILS/"><asp:Label BorderColor="black" BorderWidth="2px" Width="100px" ID="dskILS" Text="ILS" ToolTip="ILS" runat="server" style="cursor: hand" /></a>
<a href="/Taba_Web/תקינה והפעלה/"><asp:Label BorderColor="black" BorderWidth="2px" Width="100px" ID="dskTkna" Text="תקינה והפעלה" ToolTip="תקינה והפעלה" runat="server" style="cursor: hand" /></a>
<asp:Label ID="msg1" runat = "server" />
</asp:Panel>
</
div>