Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am newie .... i try ...but not detect what 's the problem ? behind its...
When I open the web application It's display horizontal but when i click on any menu items
it's going to vertically when till page load after that its come with actual position "Horizontal" i think bind the control in page init time how can i write...
please give suggest to me
i face the problem in internet explorer .....my code on aspx is

ASP.NET
<div id="Navigation">
    
        <asp:Menu ID="mnuNavigation" runat="server" Orientation="Horizontal"  
            EnableTheming="False" 
            StaticEnableDefaultPopOutImage="False" 
            StaticMenuItemStyle-Font-Size="1.2em"
            StaticSubMenuIndent="10px" 
            DynamicHoverStyle-Font-Bold="true" 
            DynamicMenuItemStyle-HorizontalPadding="05px" 
            
            Font-Bold="True" 
            Font-Names="Verdhana" 
            Font-Size="1.0em"  
            StaticHoverStyle-Font-Bold="true" 
            
            BackColor="#5B7942" 
            ForeColor="white"  
            RenderingMode="Default"> 
        
            <dynamichoverstyle font-bold="True">
            Font-Size="1.1em" 
            BackColor="#013116" 
            ForeColor="White" >
            </dynamichoverstyle>
           
            <dynamicmenustyle backcolor="#496A2D" />
            <dynamicselectedstyle backcolor="#B5C7DE" />

            <items>
                <asp:MenuItem Text="Home" Value="Home" NavigateUrl="~/LoginPage.aspx" >
                    <asp:MenuItem Text="Registration" Value="Registration">
                        <asp:MenuItem Text="Parivar Register" Value="Registration" 
                            NavigateUrl="~/ParivarRegistration.aspx">
                        <asp:MenuItem Text="Search User" Value="Search Parivaar Records" 
                            NavigateUrl="~/UserSearch.aspx">
                   
                    <asp:MenuItem Text="Search" Value="Search" Enabled="false" Selectable="False">
                    <asp:MenuItem NavigateUrl="~/SearchParivarRecords.aspx" 
                        Text="Search Parivar Records" Value="Search Parivaar Records">
                    
                
                    <asp:MenuItem Text="Reports" Value="Reports"  Enabled="false" Selectable="true">
                   
                    <asp:MenuItem Text="Show Report " Value="Show Report " 
                        NavigateUrl="~/SearchPRReport.aspx">
                    
                    <asp:MenuItem Text="Show Certificate" Value="Show Certificate" 
                        NavigateUrl="~/SearchPRCertificate.aspx">
                    
                        <asp:MenuItem NavigateUrl="~/SearchPRCard.aspx" Text="Show Card" 
                            Value="Show Card">
                    
                
                    <asp:MenuItem Text="Master" Value="Master" Enabled="false" Selectable="false">
                    <asp:MenuItem Text="State" Value="State" NavigateUrl="~/State.aspx">
                    <asp:MenuItem Text="District" Value="District" NavigateUrl="~/District.aspx">
                   <asp:MenuItem Text="Ward" Value="Ward" NavigateUrl="~/Ward.aspx">
                    <asp:MenuItem Text="Mohalla" Value="Mohalla" NavigateUrl="~/Mohalla.aspx">
                    <asp:MenuItem Text="Sex" Value="New Item" NavigateUrl="~/Sex.aspx">
                    <asp:MenuItem Text="Marital Status" Value="Marital Status" 
                        NavigateUrl="~/MaritalStatus.aspx">
                    <asp:MenuItem Text="Religion" Value="Religion" NavigateUrl="~/Religion.aspx">
                    <asp:MenuItem Text="Qualification" Value="New Item" 
                        NavigateUrl="~/Qualification.aspx">
                    <asp:MenuItem Text="Occupation" Value="New Item" 
                        NavigateUrl="~/Occupation.aspx">
                    
                
                <asp:MenuItem Text="Logout" Value="Logout" Enabled="false"
                    NavigateUrl="~/LoginPage.aspx?logged=OUT">
            </items>


            <staticmenuitemstyle horizontalpadding="5px" />
            <staticmenustyle horizontalpadding="60px"></staticmenustyle>

            <staticselectedstyle backcolor="Black" />
        
</div>



And Css file is....

CSS
#navigation 
{
	width: 983px;
	margin-right: auto;
	margin-left: auto;
	clear: both;
	overflow: hidden;
}
#page_content {
	position: relative;
	width: 883px;
	margin-left: auto;
	margin-right: auto;
	padding: 0px 0px 20px 0px;
}


/* Masthead Styles */
#masthead h1 
{
	/*font-size:35px;
    color: #261;
	font-size:medium;
	width:30px;
	height:35px;
	font-size:medium;
	font-weight:normal;
	font-style:normal;*/
	color: #496A2D;
	display: inline;
	width:30px;
	height:35px;
}
#masthead h3 {
	font-weight: normal;
	color: #708090;
	display: inline;
	margin-top: 3.5%;
	margin-left: 10%;
}
/* Navigation Styles */
#navigation ul {
	list-style-type: none;
	width: auto;
	margin: 0;
	padding: 0;
}
#navigation li {
	float: left;
}
#navigation a {
	text-decoration: none;
	color: #fff8dc;
	display: block;
	margin:  1px;
	padding: 5px;
	border: 1px solid #708090;
	/*background-color: #8fbc8f;*/
	background-color: #BECFC5;
}
#navigation a:hover {
	text-decoration: none;
	color: #261;
	background-color: #ccc;
}
Posted
Updated 17-Feb-14 18:06pm
v3

1 solution

see the properties of the menu and update the orientation to horizontal
 
Share this answer
 
Comments
Faizymca 17-Feb-14 23:57pm    
Thnx...for reply sir, but i set the orientation to horizontal i think menu control bind at pre init time but i have no idea about code where i write....and what's code have u any idea pls send reply with example....sorry for bad English...

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