Spacing Menu Control In ASP Page?
May 27, 2010
I added a menu control to my page that is displayed vertically. I couldn't find a way to add spaces (I'd like about 5px.) between the menu items, so I just did something similar to this:
<asp:Menu ID="Menu1" runat="server" BackColor="ActiveBorder">
<Items>
<asp:MenuItem NavigateUrl="~/About.aspx" Text="One" />
</Items>
</asp:Menu>
<p></p>
<asp:Menu ID="Menu2" runat="server" BackColor="ActiveBorder">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Two" />
</Items>
</asp:Menu>
I just created multiple menu controls with a single menu item control in them, and placed a break between the menu controls. This seems very wrong to me, but I could not figure out another way. Also, this is a bit off subject, but is it okay to use empty paragraph tags as line breaks?
View 2 Replies
Similar Messages:
Jul 10, 2010
I added a menu avigation control in my page and i did this:
<div style="background-color: Maroon">
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" ForeColor="Black" Font-Bold="true"
BackColor="Chocolate">
<Items>
<asp:MenuItem Text="Home"></asp:MenuItem>
<asp:MenuItem Text="About Us"></asp:MenuItem>
<asp:MenuItem Text="Services"></asp:MenuItem>
<asp:MenuItem Text="Careers"></asp:MenuItem>
<asp:MenuItem Text="Contact Us"></asp:MenuItem>
</Items>
</asp:Menu>
</div>
but i cant give proper spacing between the menu items right now it is appearing like this: how to give proper spacing between the menu items them?
View 14 Replies
Sep 2, 2010
I am experiencing a weird issue with my menu control on a website I just launched. Basically it seems like the top and bottom padding for the control is like 400 pixels on certain pages. This does not happen on IE6, IE8, Firefox 3.6, or chrome. Only IE7 (also IE8 compatibility mode). The other weird thing is that it happens 90% of the time and not 100%, so I can't get full consistency. Here is an image of what it should look like versus what the issue is. [URL] bad menu What I have done so far is remove skiplinktext and also tried to remove the 4px padding I had, neither helped.
[URL]
menu nav = home page > studio info > Registration > Register now
View 3 Replies
Mar 2, 2010
I have trying to create spacing between items in my menu control and I have been totally unable to create any item spacing. I have tried every property with the word spacing and still I am unable to space my menu items.
View 6 Replies
Sep 3, 2010
I'm trying to use the menu control for the first time in ASP.NET and everything is fine except for the fact that I can't seem to change the item spacing property. My menu is a horizontal menu where the menu items have come from a sitemap file. I've tried changing the menu item spacing in both the dynamic and state menu item properties but nothing seems to change it. I've also tried changing the item spacing via css but that doesn't work either.
[Code]....
View 3 Replies
May 7, 2015
How to center the menuitems and highlight the selected menuitem in menu control in asp.net?
<asp:Menu ID="maspageMenu" runat="server" BackColor="#2D2D30" Width="100%" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="1.4em" Font-Strikeout="True" Font-Underline="True" ForeColor="#009933" Orientation="Horizontal" StaticSubMenuIndent="10px" BorderStyle="Groove">
<DynamicHoverStyle BackColor="#18624F" ForeColor="White" />
<DynamicMenuItemStyle BackColor="White" HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicMenuStyle BackColor="White" BorderStyle="Double" />
[CODE]...
View 1 Replies
Mar 17, 2010
We have to develop an application which has a Vertical left pane menu control which displays all the web pages (A,B,C say). Now if user is in page A and filled some data and clicks on menu control to go to page B, all the data in page A needs to be saved. Also if all the required field in page A are not filled and user navigated to page B, there will be one ! sign after the menu so that user can understand that there some some more fields need to be filled up.
We are planning to place the menu control in the Mater page. Please give me some direction to do this. My question is:
1. If user change menu (In Master Page), how should we save data?
2. How should we display the ! in the menu control?
View 2 Replies
Jan 10, 2011
I am using frames in my webpage.in one of the frames i have a menu control whose items are database driven.when click on the menu item, i want another page to be displayed in other frame.
now i want to pass the the selected menu item text to the other page using session variable which is in the menu item click event method.but the thing is when i click on the menu item, the click event is not firing.
is there any better way to pass the selected menu item text to the other page?
View 1 Replies
Jan 14, 2010
I have a MasterPage where I use the menu control. Clicking a menu item loads a new content page. That part works fine.
I would like to use staticselected style to change the look of the selected menu item. However, when the new content page loads, the staticselectedsyle formatting does not work.
View 6 Replies
Nov 5, 2010
I have an asp:Menu control on a master page that is reading its menu items from a web.sitemap file via a SiteMapDataSource.When I click on a menu, the new page loads which uses the same master page, but the ASP:Menu vanishes. I have put some plain text next to the menu for testing, this appears on the new page but the menu does not.Does anyone know how to get the asp:Menu to remain visible on the page?
View 4 Replies
Feb 23, 2011
I want to replace the menu control of master page from contentplaceholder when i click on submit button what is the best way to do this?
View 1 Replies
Feb 2, 2011
I have a Menu control in my master page, which I dynamicly add items to in each content page:
[Code]....
how can I call the method if it's in the content page?
I thought about saving in the ViewState something that will mark it was clicked, but the MenuItemClicked event is fired after Page_Load event is fired.
View 2 Replies
Jun 2, 2010
I'm working on a web application that uses ASP.NET 3.5 and C#. Structurally, I have a master page with a menu control on it. The control serves as my navigation, and it gets its items from a SiteMapDataSource control and a corresponding Web.sitemap file.
The problem is that some styles do not render properly when you specify the CssClass property. More specifically, the selected and hover styles don't respond to css styles. Consider the code below:
[code]....
any insight into what is causing this problem and how to neatly work around it? I'm aware I might be able to programmically determine the current page and select the corresponding menu item manually so it receives the proper style class, but before I resort to hacking C# and Javascript together to fix this functionality.
View 4 Replies
Oct 22, 2010
i tried to add 2 menu server control on the same page but it was positioned one below the other instead of next to each other...
each of the menu will have several child nodes but it will be display like a drop down list
CarMakers | CarModels | RegistrationNumber
Citroen C3 XPTO
Renault Clio ABCD
This is how i want the menu to look like
but I only managed to add them like this:
CarMakers
Citroen
Renault
CarModels
C3
Clio
View 2 Replies
Aug 31, 2010
i have declared two control in my master page , how wants to call this
menu control in child page ( that is login page)
i want to bind the menu control dynamically based on login previlage
public Menu newMenu = new Menu();
public MenuItem newItem = new MenuItem("Master");
View 3 Replies
May 7, 2015
I am binding Menu Item Dyanamically from database.
<asp:Menu ID="myslidemenu" runat="server" DataSourceID="Xmldatasource1" DynamicHorizontalOffset="2"
BackColor="#7db641" StaticDisplayLevels="1" Orientation="Horizontal" CssClass="nav">
<DataBindings>
<asp:MenuItemBinding DataMember="MenuItem" NavigateUrl="~/View/Products.aspx" TextField="Text" />
</DataBindings>
<StaticSelectedStyle />
<DynamicMenuStyle />
<DynamicSelectedStyle />
<DynamicMenuItemStyle />
</asp:Menu>
At navigate URL I want to pass query string value id Or Text of select menu item...
View 1 Replies
Apr 5, 2010
Is there a way to add/delete/update the default classes (for instance AspNet-Menu-WithChildren,AspNet-Menu-NonLink ) of the html generated by the asp.net menu or treeview control? I am using CSSAdapters so the menu control renders in a list format instead of table format.
View 1 Replies
Apr 24, 2015
I have placed an aspx menu control on my master page with orientation as Horizontal. Below is HTML markup.
HTML Code:
<asp:Menu ID="mnuMedChem" runat="server" Orientation="Horizontal" Width="100%" OnMenuItemClick="mnuMedChem_MenuItemClick">
<DynamicHoverStyle CssClass="DynamicHover" />
<DynamicMenuItemStyle CssClass="DynamicMenuItem" />
[Code]....
I have tried populating the menus from my database by using the
Code:
mnuMedChem.Items.Add
and
Code:
mnuMedChem.FindControl(value).ChildItems.Add
The menu items and the childs are populating correctly but then the menu is not being displayed on the menu control.
View 4 Replies
Oct 2, 2010
For the ASP.NET Menu Server Control whose RenderMode is set to "List", there is an "Orientation" property which decides whether the menu would render as a horizontal or a vertical menu. I have compared the two HTML source code and was unable to find out which part of the HTML/CSS code set the orientation of the menu(unordered list).
View 2 Replies
Feb 3, 2011
Currently I have a menu control on my webform in ASP.Net 4.0 :
<div class="PNMenu">
<asp:SiteMapDataSource ID="PNSiteMap" runat="server" ShowStartingNode="false" />
<asp:Menu ID="PNMainMenu" runat="server" DataSourceID="PNSiteMap" RenderingMode="List" Orientation="Horizontal" CssClass="PN-PrimaryNavMenu" >
</asp:Menu>
</div>
I am trying to style the menu control to allow the menu items to float to the right of the container, however I am unable to do so as whenever I am styling the a, ul or li it keeps getting overidded by asp.net and floats everything left.
.PNMenu
{
clear:both;
[code]...
View 5 Replies
Jul 15, 2013
i have a asp menu in master page and it is populated from database.
i want if user click a link that menu link's background color should change how to do?
View 1 Replies
Apr 8, 2013
What I want is to show menu items Administrator or show user menu items.Show menu items using login...How I can do it with role provider, control menu and siteMap in masterpage?
View 1 Replies
Dec 1, 2010
I would like to control the menu display (show/hide menu items) in my ASP.NET 3.5 website based on the user's AD group and also control the functionality within a page using user's active directory group membership. how to do this? menu is stored in an xml file and bound to a control. all the examples I see on the web are related to forms authentication. this is an intranet website with integrated windows authentication and both authentication and authorization should be controlled using user's active directory groups.
View 1 Replies
Oct 14, 2011
Looking to open a separate windows when a page is selected from the menu.Here's the xml code using taget=_blank...but it's not working.
Code:
<MENU text="Help" url ="">
<SubMenu text="About" url="About.asx" target="_blank"></submenu>
</Menu>
View 5 Replies
Feb 22, 2010
I need a help in creating a vertical oriented Menu control with dynamic url's set in there Navigate Url property.Also i need to set the menu items as enable/disable in two different modes say edit/new.
View 1 Replies