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,

i have design master page placed menustrip set orientation in horizontal mode but still while view in browser it shows vertical menu can you please help me out my source code is as follows
ASP.NET
<asp:ContentPlaceHolder id="head" runat="server">
    
</head>
<body>
    <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:08pm
v2

Use this valuable thread!

ASP.NET Horizontal Menu Control[^]

regards
Karthik.J
 
Share this answer
 
you have put your content place holder outside of your form and then close it before you have closed your form

try using this code

i copied your code and tried to run it but there were issues cos it was very neat

XML
<form>

 <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
     <asp:Menu ID="Menu2" runat="server" Orientation="Horizontal">
         <Items>
         <asp:MenuItem NavigateUrl="~/Default.aspx" Text="HOME" Value="HOME"></asp:MenuItem>
             <asp:MenuItem NavigateUrl="~/About.aspx" Text="About" Value="About">
             </asp:MenuItem>

 <asp:MenuItem NavigateUrl="~/Contact.aspx" Text="CONTACT" Value="CONTACT"></asp:MenuItem>
 <asp:MenuItem NavigateUrl="~/Change.aspx" Text="CHANGE" Value="CHANGE"></asp:MenuItem>          </Items>
     </asp:Menu>

 </asp:ContentPlaceHolder>
    </form>
 
Share this answer
 
v2
try site map for thispurpose.

Regard
sham
 
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