.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Easiest way to build XML based Menu with Submenu

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
Hello guys, I need to develop an easy and quickly to build menu structure based on xml. The menu needs to have a "Main" menu at top of the screen and a submenu at the left of the screen. Excactly like this: http://www.enexis.nl/site/over_enexis/ Can someone explain to me where i need to get started and wich control i should use?   Thanks alot! cheers,   Rob 

View Complete Post

More Related Resource Links

Problem making Role based Menu in MVC application



 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?



"Oslo" Basics: Build Metadata-Based Applications With The "Oslo" Platform


We introduce you to "Oslo" and demonstrate how MSchema and MGraph enable you to build metadata-driven apps. We'll define types and values in "M" and deploy them to the repository.

Chris Sells

MSDN Magazine February 2009

VSTO: Build Office-Based Solutions Using WPF, WCF, And LINQ


With Visual Studio Tools for Office you can easily build Office-based services that harness the power of Windows Communication Foundation, Windows Presentation Foundation, and LINQ.

Andrew Whitechapel

MSDN Magazine December 2007

Vector Graphics: Build Flexible, Lightweight XML-Based Images for ASP.NET Using Scalable Vector Grap


Scalable Vector Graphics (SVG), a W3C graphics standard built around XML, is one of several vector graphics technologies that allows fast, lightweight drawings such as charts and graphs to be rendered on the fly in an appropriate viewer. There are many advantages to such vector graphics, including conservation of bandwidth and storage media, and flexibility. This article explains these benefits and shows you how to easily add powerful, dynamic, interactive visual elements to your Web applications.

Dennis Forbes

MSDN Magazine July 2003

Debugging Tool: Build a Logging and Event Viewing Library to Help Debug Your .NET Framework-based Ap


Building a basic, reusable application framework can make development quicker and easier. This allows you to focus more on the problems at hand and less on the repetitive tasks involved in building any application. In this article, the author presents a framework that provides facilities to access the registry and an extensible framework for logging messages to a console window or the Event Viewer. This reusable framework can be included as a library in your projects, allowing you to display an enhanced, color-coded message log and dynamically change logging levels.

Daryn Kiely

MSDN Magazine May 2003

Bug Tracker: Build a Configurable Web-Based Bug Management Tool Using ADO.NET, XML, and XSLT


One of the most significant features of ADO.NET is its integration with XML. Developers can either use an ADO-like API to access the data or work directly with an XML representation of the data. This article demonstrates how both of these techniques can be used together to create Web applications that take advantage of XML standards such as XSLT. The example presented here is a bug tracking application built using C# and the.NET Framework. The development of the application covers several topics including data access using ADO.NET, the presentation of data using XSLT stylesheets, and the integration of ADO.NET with the .NET XML Framework.

Roy Margolis

MSDN Magazine July 2002

asp:Menu submenu hover/expansion + HTTPS = Security Information Popup

Hello,I have a an asp:Menu with a datasource and the page is being accessed by https. If I hover over one of the menu items that has a subitem I get this popup.Here is my code,//asp <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="UI_Common_Test" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Menu ID="Menu1" runat="server" DataSourceID="dsSiteMap" Orientation="Vertical" StaticDisplayLevels="2"> <DataBindings> <asp:MenuItemBinding DataMember="SiteMapNode" TextField="Title" /> </DataBindings> </asp:Menu> <asp:SiteMapDataSource ID="dsSiteMap" runat="server" SiteMapProvider="Public" /> </div> </form> </body> </html> //cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI;

Menu based on Hierarchyid

I'm trying to base a Menu on the HierarchyID type.The problem is that a Menu will only accept an XML file or a Sitemap as its data source.Therefore, my question is: has anyone worked out a conversion of HierarchyID->XML or HierarchyID->Sitemap? Unfortunately, it seems that HierarchyID is a vastly underused data type and whenever I find anything on the subject on the Internet its used for something else, isn't exactly adaptable to Web Applications or simply doesn't work.

Top navigation menu having submenu in Team site in MOSS2007

Hi, In MOSS2007, Collaboration portal site is showing sub menu on onmouseover of top navigation menu, but it's not showing in case of Team Site template. I would like to know how to achieve this. I tried to activate publishing feature on team site, but doesn't work.

Collect Menu/Submenu/Popupmenu items

Dear Sir, I am using VS2005 and SQL Server2000 I have a project where lot of Menu/Submenu/Popupmenu items. Now I want to have all Menu/Submenu/Popupmenu items in a list box of the project. I want to do this for create user access control to my project. so that selective group can access selected feature and Menu/Submenu/Popupmenu items. How can I do this ?????? / or is there any other way to control this access????

Is it possible to disable context menu items based on the selection on Treeview

I will have some sort of nodes for a treeview as follows Root |-> some.txt(A text file which was added at runtime) |->Child(child for some.txt) |-> child1(child for child) I designed my context menu with some options as New and Remove What i need is when i righclick on Root, child or child i would like to disable the Remove option

Create Menu With MultiLevel SubMenu



i want to Create MultiLevel subMenu With this code


[ToolboxData("<{0}:Menubar runat=server>/{0}:Menubar>")] 
    public class Menubar : WebControl, IPostBackEventHandler 
        private List<MenuItem> _menuItems = new List<MenuItem>(); 
        public List<MenuItem> MenuItems 
                return _menuItems; 
    [ParseChildren(true, "MenuItems")] 
    public class MenuItem 
        private string _clientClick; 
        private List<MenuItem> _menuItems = new List<MenuItem>(); 
        public string Title { get; set; } 
        public string Href { get; set; } 
        public string Id { get; set; } 
        public List<MenuItem> MenuItems 
            get { return _menuItems; } 
            set { _menuItems = value; } 


submenu of main menu should come in the left side of everypage


I am using asp.net Menu control with sitemap datasource. There is one Web.sitemap in the folder where links are saved in such a manner

<siteMapNode url="~/MainMenu.aspx" title="Software Development Solutions" description="Software Development Solutions" >

      <siteMapNode url="~/submenu.aspx" title="CRM Software Application Development" description="CRM Software Application Development" />

     <siteMapNode url="~/submenu.aspx" title="CRM Software Application Development" description="CRM Software Application Development" />
<siteMapNode url="~/submenu.aspx" title="CRM Software Application Development" description="CRM Software Application Development" />


One asp.net page as i m using asp.net menu control. i want when MainMenu is clicked all the sub links of that menu should be come in the left side of the page.

transparent border around a submenu level in asp menu control..


i know this must be simple but not sure of how to get this done.

i need a border that is transparent around a level of submenu for a asp menu control(not around each of the sub menu item) similar to this.

and also the inside menu should have two layers of submenu if it is too long..

How can i do this.. Its really urgent..

Can you custom format a single sitemapnode based it's text, url or level (submenu)?


The title pretty much states the question.  I have a menu inside my asp.net master page.  This menu pulls from  a web.sitemap file.  I have a css file that formats the individual nodes.  However, I want to format the menu headers a certain way while the submenu's are different.  Namely, I want to put a small image before all the submenu points while not the main sitemapnodes.  So far, I can use css to put the image infront of every node.  But I haven't been able to differentiate between the nodes.  The main node has a blank URL instance.  I thought I could use that in the C# code but I haven't been able to .  Could someone give me a link or show some code on how to do this?  Thanks.

Custom Menu Based On Foreign Key



I have a set of tables such as: songs, genre. The songs table has a foreign key (GenreID) from the genre table. I am trying to set up a menu in one content placeholder using a gridview and hyperlinks to open a listview of the corresponding songs  list in another content placeholder. Sort of like with the example using a list of tables opening up a specific table in the Dynamic Data Walkthrough. I have been struggling with this for days and seem to be going in circles.

Here is the code in the first gridview:

<asp:ContentPlaceHolder ID="menuContent" runat="server">
                            <asp:DynamicDataManager ID="DynamicDataManager1" runat="server" >
                                <asp:DataControlReference ControlID="GridView_Genre" />

Resetting properties in web deployment project based on custom build config file


I'm trying to create a general build environment for multiple projects that can take a some command line parameters and execute a build based on a custom config file.

The problem I am having is after I read in the config parameters with MSBuild.Community.Tasks XMLQuery, which works fine, I can't get aspnet_complier to see these parameters.

I keep getting "error MSB3462: Either MetabasePath or VirtualPath must be specified."

 Here is my project file:

<Project InitialTargets="PreMessage" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
   <Target Name="PreMessage">
    <Message Text="Building..." />
 <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tas

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend