Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
sir,

while designing master page i placed menustrip horizontal orientation but still after view in browser deafault.aspx its shows vertical.(after placing horizontal orientation menustrip its shows me while view in browser vertical orientation)
my code is as follows:

C#
<form id="form1"  runat="server">
    <div align="center">
        style="font-family: 'Arial Narrow'; color: #FF0000; background-color: #FFFF00">My new web site<br />
        <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" StaticSubMenuIndent="10px">
            <items>
                <asp:MenuItem NavigateUrl="~/Default.aspx" Text="HOME" Value="HOME">
                
                <asp:MenuItem NavigateUrl="~/About.aspx" Text="ABOUT" Value="ABOUT">
                
                <asp:MenuItem NavigateUrl="~/Contact.aspx" Text="CONTACT" Value="CONTACT">
                
                <asp:MenuItem NavigateUrl="~/Change.aspx" Text="CHANGE" Value="CHANGE">
                
            </items>
        
 <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        
        
    </div>
    </form>
Posted
Updated 3-Sep-12 22:00pm
v3

1 solution

I have tested your code, It works fine... I have modified some portion. See this :-

XML
<form id="form1" runat="server">
<div style="font-family: 'Arial Narrow'; color: #FF0000; background-color: #FFFF00">My new web site
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" StaticSubMenuIndent="10px">
    <Items>
        <asp:MenuItem Text="Menu1" Value="Menu1"></asp:MenuItem>
        <asp:MenuItem Text="Menu2" Value="Menu2"></asp:MenuItem>
        <asp:MenuItem Text="Menu3" Value="Menu3">
            <asp:MenuItem Text="SubMenu3-1" Value="SubMenu3-1"></asp:MenuItem>
            <asp:MenuItem Text="SubMenu3-2" Value="SubMenu3-2"></asp:MenuItem>
        </asp:MenuItem>
    </Items>
</asp:Menu>
 <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server" />
 </div>
</form>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900