Speed up development with full-stack environments for every branch.

Learn More

ASP.Net How To Use Menu

Forked from Retrieving User's IP Address using ASP.NET.

17072 Runs 53521 Views 18818 Copies

ASP.net How to use menu

Saved

Saved

invincibleideas 20

invincibleideas
published 4 years ago

<%@ Page Language="C#" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>ASP.net How to use Menu</title>
    <style type="text/css">
        div
        {
            margin: 5px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <fieldset>
            <h3>
                How to Use Menu Control</h3>
            <div>
                <asp:Menu ID="navMenu" runat="server" 
                    BackColor="#007FFF" BorderColor="#0066CC"
                    StaticMenuItemStyle-ForeColor="#FFFFFF" 
                    StaticMenuItemStyle-VerticalPadding="10px"
                    StaticMenuItemStyle-HorizontalPadding="10px"
                    RenderingMode="List" Orientation="Horizontal">
                    <Items>
                        <asp:MenuItem Text="Home" NavigateUrl="home.aspx"></asp:MenuItem>
                        <asp:MenuItem Text="Categories"></asp:MenuItem>
                        <asp:MenuItem Text="Products"></asp:MenuItem>
                        <asp:MenuItem Text="About Us" NavigateUrl="AboutUs.aspx"></asp:MenuItem>
                        <asp:MenuItem Text="Contact Us"></asp:MenuItem>
                    </Items>
                </asp:Menu>
            </div>
        </fieldset>
    </div>
    </form>
</body>
</html>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).