Show Submenu With Sitemap?
Jan 10, 2011
how to show submenu with sitemap in asp .net? where is wrong?
<asp:SiteMapDataSource ID="SiteMapDataSource1" StartingNodeOffset="-2" ShowStartingNode="false" StartFromCurrentNode="true" runat="server" />
<asp:Menu ID="Menu1" runat="server" BackColor="Transparent"
DataSourceID="SiteMapDataSource1" DynamicHorizontalOffset="2"
Orientation="Horizontal"
DynamicEnableDefaultPopOutImage="False"
StaticEnableDefaultPopOutImage="False"
EnableViewState="False"
staticdisplaylevel = "2"
dynamicdisplaylevel = "2"
Font-Names="Verdana" Font-Size="1.2em" ForeColor="#666666"
StaticSubMenuIndent="30px">
<StaticSelectedStyle BackColor="Transparent" />
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="LimeGreen" ForeColor="White" />
<DynamicMenuStyle BackColor="#E3EAEB" />
<DynamicItemTemplate>
<%# Eval("Text") %>
</DynamicItemTemplate>
<DynamicSelectedStyle BackColor="#1C5E55" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<StaticHoverStyle BackColor="LimeGreen" ForeColor="White" />
</asp:Menu>
<siteMapNode url="~/hello.aspx" title="Start" description="" >
<siteMapNode url="~/Default.aspx" title="Home" description="" />
<siteMapNode url="~/Daily_Transaction.aspx" title="Pay fee" description="" />
<siteMapNode url="~/EditCompanyMaster.aspx" title="Update Company Name" description="" />
<siteMapNode url="~/Report_Selection.aspx" title="Report" description="">
<siteMapNode url="~/DailyReport.aspx" title="Daily Report" description="" />
</siteMapNode>
</siteMapNode>
View 1 Replies
Similar Messages:
Feb 25, 2011
I am using asp.net2.0 , C#. I am binding menu control with sitemap to display menus and submenues. Which also restrict access and display of menu or submenu based on user's roles. I want to know Is it Possible to show/ Hide submenu based on sql tables with existing sitemap method
View 1 Replies
May 27, 2010
Whenever i add a exta submenu to:
<siteMapNode url="~/washroom/default.aspx" title="Washroom Supply" description="Washroom Supplies">
<siteMapNode url="~/washroom/example.aspx" title="Example" description="Example" />
</siteMapNode>
I get the error page.I managed to add one sub menu(example) but there is no way that I can add more. Everything looks ok but for some reason dosent work. That's the whole map:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns=[URL]
<siteMapNode url="/" title="Home" description="Home page">
<siteMapNode url="~/cleaning/default.aspx" title="Cleaning" description="Cleaning Services">
<siteMapNode url="~/cleaning/office.aspx" title="Office Cleaning" description="Office Cleaning" />
<siteMapNode url="~/cleaning/ceiling.aspx" title="Ceiling Cleaning" description="Ceiling Cleaning" />
<siteMapNode url="~/cleaning/awning.aspx" title="Awning and Canopies" description="Awning and Canopies" />
<siteMapNode url="~/cleaning/pubs.aspx" title="Pubs, Bars and Clubs" description="Pubs, Bars and Clubs" />
<siteMapNode url="~/cleaning/communal.aspx" title="Communal Areas" description="Communal Areas" />
<siteMapNode url="~/cleaning/carpet.aspx" title="Carpet and Upholstery" description="Carpet and Upholstery" />
<siteMapNode url="~/cleaning/window.aspx" title="Window Cleaning" description="Window Cleaning" />
<siteMapNode url="~/cleaning/pressure.aspx" title="Pressure Washing" description="Pressure Washing" />
</siteMapNode>
<siteMapNode url="~/distribution/default.aspx" title="Distribution" description="Distribution Services">
<siteMapNode url="~/distribution/price.aspx" title="Price Guide" description="Price Guide" />
<siteMapNode url="~/distribution/areas.aspx" title="Areas We Cover" description="Areas We Cover" />
<siteMapNode url="~/distribution/collection.aspx" title="Free Collection" description="Free Collection" />
</siteMapNode>
<siteMapNode url="~/office/default.aspx" title="Office Supply" description="Office Supplies" />
<siteMapNode url="~/washroom/default.aspx" title="Washroom Supply" description="Washroom Supplies">
<siteMapNode url="~/washroom/example.aspx" title="Example" description="Example" />
</siteMapNode>
</siteMapNode>
</siteMap>
View 7 Replies
Mar 24, 2014
I got requirement to create a accordion menu which will have different menus for different site collection.
So, i created this Accordion which is in bind with site map file. But my Sitemap file has multi-level nodes, here my accordion is displaying only single level menus.
View 1 Replies
Oct 6, 2010
I have a horizantal menu that has 3 items.Home Solutions Contact DatabaseSoftwareTechnical SupportAs you can see when you hover over Solutions it displays 3 submenu items.Beneath this menu, I have a JavaScript Slide Show.The problem is when you hover over Solutions it displays only the first 2 submenu items, the 3rd one (Technical Support) is chopped off by the JavaScript Slide ShowI have tried this in IE & FireFox and the same problem occurs.Can anyone please assist me in why the JavaScript Slide Show makes the sub menu items dissappear?
View 11 Replies
Aug 2, 2010
I am using Asp.net menu control, how can I delay the showing of sub menu items ?
View 7 Replies
Sep 28, 2012
i have a menu, what i want is that when i click on parent item of menu then only subitem should display,mean i dont want to display subitem on mouseover. what should i do.Is there any property should i set or i have to write code for it .
View 1 Replies
May 25, 2010
I have a few items apart of my Web.sitemap file that rely on querystring or session variables. I do not want these items to appear in my menu. Is there a way to hide it from the menu, but still be in the sitemap (for sitepath control).
View 3 Replies
Jan 24, 2010
I create a site map for my site but it only works three levels deep and I need at least six. How can I do that? Every time I add a child node under "Water Filters, Desalinators or Micropur" the sitemap doesn't show the child node. Until now my sitemap only works three levels deep: Home > Products > Water Filters But I need this: Home > Products > Water Filters > Katadyn > Personal Use > Pocket Turbo 1. This is my sitemap configuration:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns=[URL] >
<siteMapNode url="~/default.aspx" title="Home">
<siteMapNode url="~/products.aspx" title="Products">
<siteMapNode url="~/waterfiltes.aspx" title="Water Filters" />
<siteMapNode url="~/desalinators.aspx" title="Desalinators" />
<siteMapNode url="~/micropur.aspx" title="Micropur" />
</siteMapNode>
<siteMapNode url="~/services.aspx" title="Services" />
<siteMapNode url="~/partners.aspx" title="Partners" />
<siteMapNode url="~/aboutus.aspx" title="About Us" />
<siteMapNode url="~/contact.aspx" title="Contact Us" />
</siteMapNode>
</siteMap>
View 8 Replies
Jan 6, 2011
How to show menu with sitemap based on sql server data?
View 1 Replies
Oct 1, 2010
We have a dynamic sitemap and all nodes in the sitemap display a breadcrumb. Is it possible to have the breadcrumb still showing, but make the link in the sitemap invisible or non-clickable? Reason for this is that... we dont want users to select some pages from the sitemap (becasue they need to conduct a search first to populate a datagrid) and clicking on the link will only take them to an empty page. I tried just removing the url, or having a blank title, but that didn't work.
View 14 Replies
May 11, 2010
We are getting this error message when we try to click the link in the menu to go to Report Server:
Source Error:
Line 31: <siteMapNode title="Reports" description="Reports">
Line 32:
Line 33: <siteMapNode url="https://ffxsqldgc01.ffx.co.fairfax.va.us/Reports/Pages/Folder.aspx?ItemPath=%2fDPZ&ViewMode=List" title="View Reports"
description="Click here to view the reports" />
Line 34: </siteMapNode>
Line 35:
I tried to add after the &, as it was suggested on one of the forum but it did not work. Any other ideas.
View 5 Replies
Aug 2, 2010
I've been having some production runtime errors that I don't fully understand. This has happened to us on a couple different ASP.NET 4.0 Web Sites (shudders - yes, I know - we're porting it to MVC but that's taking some time).
First of all, we have never been able to reproduce this issue in development/QA environments. Secondly, upon deployment, the issue seems to be non-existent. Sometimes the issue manifests within a day or two of deployment and other times the deployment will be live for a month without it manifesting at all. However, once it manifests, then ANY page viewed under the web site causes the error. Lastly, this problem seemed to only come up once we migrated to .NET 4.0. We started at 2.0, a year ago upped to 3.5, and recently upped to 4.0 with this solution and most child projects.
The error:
Could not find the sitemap node with URL '~/Default.aspx'.
A simplified version of our sitemap (with some names changed and uninteresting nodes removed) is as follows:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode roles="*" title="EG">
<siteMapNode url="~/../SM/Default.aspx" title="Welcome" description="" roles="*" />
<siteMapNode url="~/../SD/Default.aspx" title="SD" description="" roles="*" />
<siteMapNode url="~/../SMD/Default.aspx" title="SMD" description="" roles="*" />
[code]...
I have confirmed in all of the SiteMaps that there is a node with url="~/Default.aspx" with roles="*" (which includes public/anonymous access), so I am very confused as to why this problem occurs.
SiteMap does not have a node for Default.aspx. All of them do. SiteMap's Default.aspx node is not accessible for security reasons to the current user/role. They're all accessible to anonymous users and this problem even exists for super admin users. Passed-in URL contains querystrings (Default.aspx?abcd). I don't know if this is a problem (I sure would hope not) but once the problem manifests itself, I can handwrite the URL with no querystrings and the problem still exists.
SiteMap changes. It doesn't Service's permissions to the sitemap file. The sitemap works perfectly fine after a deployment, so unless permissions are changed in a way that IISRESET fixes, then this is not an issue. The worker process becomes globally corrupt. I don't think so. We have ~12 web sites all in the same app pool and the problem always stays confined within a single web site. Also, we have yet to have this happen to more than a single web site at a time although it has manifested itself in 4 different ones so far.
View 1 Replies
Jan 25, 2011
I've got a custom menu navigation built from a web.sitemap file, the first line of this would be something like:
SiteMapNodeCollection topLevelNodes = SiteMap.RootNode.ChildNodes;
However, now I want to be able to create multiple web.sitemap files, and then programmatically determine which web.sitemap file to use, but I can't seem to find out how to do this. I'm assuming I could either create one custom SiteMapProvider that can perform the logic to determine which web.sitemap file to load, or I have multiple providers, each one with the SiteMapFile property set to a specific *.sitemap file, and then switch providers programmatically before I access SiteMap.RootNode.
View 2 Replies
Oct 6, 2010
I am creating a CacheDependency on the file that my SiteMap provider uses. I would like to get the name of the file from my sitemap provider instead of hard coding it. Is there a way?
Edit
Duh, I forgot to mention: XmlSiteMapProvider that comes with ASP.NET
Edit 2
Reflector shows a private member field called _filename that isn't exposed in any way as far as I can tell.
View 1 Replies
Nov 4, 2010
How would I programatically reference a .sitemap file that is not the root web.sitemap file? I have a file called research.sitemap in a folder a level under root. I want to refernce this file in my code behind like his: SiteMapNode m1 = SiteMap.RootNode (but since this isnt web.sitemap in the root, I dont know how to get access to it).
View 1 Replies
Mar 25, 2010
I have a second level node that goes onto two lines. The first line indents 15px as is set by the class for node level 2. The seond line kicks back to the same level as 1st level nodes. Here's what I mean:
Parent Node
Second node
line 2 of second node
I want it to be like this:
Parent Node
Second Node
line 2 of second node
View 4 Replies
Jul 6, 2010
I am working on a website at the moment, I am using .NET 4 and VB. My site is contained within a Master Page and all working OK. I am using an ASP:MENU control which is driven by a web.sitemap file and works a treat. I have had an idea of something I would like to know but I am struggling to get it going correctly (not sure if it is even possible) What I am after doing is having the main categories of my website across the top horizonally (this part is no problem) and the sub menu items going vertically but down the left side of the page such as:
Logo Here
Menu Head 1
Menu Head 2
Menu Head 3
Sub Menu Head 1
Sub Menu Head 2
Sub Menu Head 3
Does anyone have any idea if such a thing is possible or not?
View 3 Replies
Feb 4, 2010
We are facing an issue related to positioning of submenu in IE7.The submenu is hiding or else its overlapping Main menu.We have tried with offset values in order to set the positioning of submenu and tried with various combinations also.But its not working.
View 1 Replies
Jan 11, 2010
i m using asp menu controle in an mobile application.but its submenu is not working on mobile browser
View 1 Replies
Oct 26, 2010
I have an asp.net file with a 2 level menu. I changed the menu background to transparent. When I run the page in the Expression Development Server it works fine but I upload the file to [URL] hosting and the submenu items display with a white background. Is there a way to fix this and why does it behave differently in EDS and ASP.net from Godaddy? I also created my own IIS server and posted the page with the same results.
View 1 Replies
May 7, 2015
How to add submenu to particular menu using repeater control...
View 1 Replies
Aug 22, 2010
I have for example a ASP Menu control having a static (File) and dynamic (Open, New) menu such as :
[code]....
I am able to see this menu under VS 2008 under my development PC. But when I deploy the app to a IIS server, and run the app, the whole app appeared the same. Only the Menu has "File" for selection but the submenu items (Open and New) did not appear when the mouse cursor was moved over "File". Only the Outline of the dropdown box of the submenu appeared.
View 2 Replies
Mar 14, 2011
I am creating menu.ascx. I am trying to create main menu horizantel orientation and sub main vertical orientation . but not able to create it. My both main menu and sub menu is displaying horizental.
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" BackColor ="#cc33ff" Font-Size="12pt" ForeColor="White" >
<StaticMenuItemStyle HorizontalPadding="2px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="Info" ForeColor="DarkSlateBlue" />
<%--<DynamicMenuStyle BackColor="#D0E7FF" HorizontalPadding="2px" VerticalPadding="2px" />--%>
<DynamicMenuStyle BackColor="#ff33ff" HorizontalPadding="2px" VerticalPadding="2px" />
<StaticSelectedStyle BackColor="#366AB3" ForeColor="White" HorizontalPadding="2px" VerticalPadding="2px" />
<DynamicSelectedStyle BackColor="#507CD1" />
<DynamicMenuItemStyle HorizontalPadding="2px" VerticalPadding="2px" Font-Size="10pt" />
<Items>
<asp:MenuItem text = " Home " Value= "Home" NavigateUrl ="~/menu.aspx"> </asp:MenuItem>
<asp:MenuItem text = " Emp " Value= "Emp" >
<asp:MenuItem text = " Entry " Value= "Entry" NavigateUrl="~/info/entry.aspx">
</asp:MenuItem>
<asp:MenuItem text = " Entry1 " Value= "Entry1" NavigateUrl="~/info/entry1.aspx" >
</asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
View 1 Replies
Jan 12, 2011
After launching my first ASP.NET site (www.oldfutures.com), I have noticed that the dropdown menus of my NavigationMenu web server control don't appear in Internet Explorer or Google Chrome... however, they show up and work fine in Firefox. Looking at the page source I found the following line that I think might be responsible:
.ctl00_NavigationMenu_0 { background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
I have noticed that all of the menu items with submenus include a tag for ".ct100_NavigationMenu_0", and all of the submenus don't appear as they should. They simply appear white, and none of the options of the submenus function. The problem is that I don't know where that code is being generated from. I can't find any settings where that is set up. It must be generated by ASP.NET 3.5, but I don't know where from, nor how to change it. Is this line indeed the problem? If so, how do I fix it? Is there some other line in there that is the problem? I've been trying to figure this out for a while and feel like I'm beating my head against a wall. Could anyone take a quick look at my site and see if you can figure it out, or at least point me in the right direction?
View 2 Replies