How to set up a static menu?

S

stacy

Hi all,

I'm new not only to asp.net, but also to web development so I'm sure I
am doing something fundamentally wrong. I've searched every source I
can think of and don't see what it is. I want to set up a menu,
exactly like the menus we see every day in our development tools ie: VS
2005, Word, Excel, the typical menu that starts with File, Edit, View
and ends with Help. I would like my menu to behave the same way, click
on the File and it expands below with other sub menu options. I tried
to do this in the VS 2005 development environment by adding items in
the items property. I played around with the StaticDisplayLevels
property and the MaximumDynamicDisplayLevels property but all I
succeeded in doing was create one of the following menu looks when i
ran it.
File View Tools (when StaticDisplayLevels=1 and
MaximumDynamicDisplayLevels =0)

OR

File Read Exit View Physical Location Logical Profile Tools Config
Query (when StaticDisplayLevels=4 and MaximumDynamicDisplayLevels =0)

OR

If I set StaticDisplayLevels=1 and MaximumDynamicDisplayLevels =2)
I see
File > View > Tools >
Read
Exit


Physical
Location
Logical
Profile

Config
Query

all down the page, they collapse and jerk the page up and down as I
move the mouse over them

Below is the master page source code generated for the menu


<asp:Menu ID="MainMenu" runat="server"
BackColor="#B5C7DE"
Font-Names="Verdana" Font-Size="0.8em"
ForeColor="Black" Height="30px" Orientation="Horizontal"
StaticSubMenuIndent="10px"
Style="background-color: white" Width="145px"
MaximumDynamicDisplayLevels="0" StaticDisplayLevels="3"
DisappearAfter="2000">
<StaticMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" BackColor="LightSkyBlue" BorderColor="Black"
BorderStyle="Solid" BorderWidth="1px" />
<DynamicHoverStyle BackColor="#284E98"
ForeColor="White" />
<DynamicMenuStyle BackColor="#B5C7DE" />
<StaticSelectedStyle BackColor="LightBlue"
BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
ForeColor="White" />
<DynamicSelectedStyle BackColor="#507CD1" />
<DynamicMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
<Items>
<asp:MenuItem Text="File" Value="File">
<asp:MenuItem Text="Read"
Value="Read"></asp:MenuItem>
<asp:MenuItem Text="Exit"
Value="Exit"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="View" Value="View">
<asp:MenuItem Text="Physical"
Value="Physical"></asp:MenuItem>
<asp:MenuItem Text="Location"
Value="Location"></asp:MenuItem>
<asp:MenuItem Text="Logical"
Value="Logical"></asp:MenuItem>
<asp:MenuItem Text="Profile"
Value="Profile"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="Tools" Value="Tools">
<asp:MenuItem Text="Config"
Value="Config" NavigateUrl="~/config.aspx"></asp:MenuItem>
<asp:MenuItem Text="Query"
Value="Query"></asp:MenuItem>
</asp:MenuItem>
</Items>
<StaticHoverStyle BackColor="LightSkyBlue"
ForeColor="White" />
<StaticMenuStyle BackColor="LightSkyBlue"
BorderColor="Black" BorderStyle="Solid"
BorderWidth="1px" />
</asp:Menu>

I had implemented this application as a windows app without any trouble
with the menu control, this just doesn't seem to work the same way at
all. Any suggestions would be great to hear.

Thanks,
Stacy
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top