CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/4/2007 7:28:16 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 14 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
gaster59
Asp.Net User
Menu control12/4/2007 7:28:16 PM

0/0

 How do i use menu control in asp.net? please teach me, thank you

surfer5
Asp.Net User
Re: Menu control12/4/2007 7:47:57 PM

0/0

There are several ways to do this; I will show you probably the most often used. Smile

 This will create a menu control that has the following structure:

menu1

  • menu1_1
  • menu1_2
  • menu1_3 

menu2

  • menu2_1
  • menu2_2

menu3

menu4

First, you will need to add a new web.sitemap file to your project that looks similar to following:

  

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="" title=""  description="">
        <siteMapNode url="" title="menu1"  description="">
            <siteMapNode url="" title="menu1_1"  description="" />
            <siteMapNode url="" title="menu1_2"  description="" />
            <siteMapNode url="" title="menu1_3"  description="" />
        </siteMapNode>
        <siteMapNode url="" title="menu2"  description="">
            <siteMapNode url="" title="menu2_1"  description="" />
            <siteMapNode url="" title="menu2_2"  description="" />
        </siteMapNode>
        <siteMapNode url="" title="menu3"  description="" />
        <siteMapNode url="" title="menu4"  description="" />
    </siteMapNode>
</siteMap>

 

This will serve as the datasource for your menu control. You will see that it is formatted in typical XML formatting, which also means there is exactly one parent node with several children under it (and some of those child nodes having children of their own). This is the way you MUST structure this file; you are not allowed to have multiple parent nodes.

The next thing you will need to do is add SiteMapDataSource control onto your page (ASPX page or a Master Page, for example). The only required parameters are the ID and the runat properties.  However, because of the way the web.sitemap file must be structured (all menu items falling under one encapsulating node), you will probably want to exclude the first-level node since it will probably not contain a real menu item.

With that in mind, your SiteMapDataSource should resemble the following:

  

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />

 The last thing you need to do is add the Menu control that will reference the SiteMapDataSource above:

<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" />

 As you can see, you are merely adding an ID and runat property and then setting the DataSourceID to the SiteMapDataSource you created earlier.

At this point, you will have a menu that works. You will probably want to format it and you may also want to do things like integrate security or globalization, but this will hopefully get you started.

-Jacob






Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages
by Jacob J. Sanford


Amanda Wang - M
Asp.Net User
Re: Menu control12/6/2007 7:20:29 AM

0/0

Hi,

The Menu control is used to display a menu in a Web Forms page and is often used in combination with a sitemapdatasource control for navigating a Web site.

The Menu control supports the following features:

  • Data binding that allows the control's menu items to be bound to hierarchal data sources.

  • Site navigation through integration with the SiteMapDataSource control.

  • Programmatic access to the Menu object model to dynamically create menus, populate menu items, set properties, and so on.

  • Customizable appearance through themes, user-defined images, styles, and user-defined templates.

 The more you can read these articles: 

Hope these help.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
PCs for Dummies Quick Reference: Quick Reference Authors: Dan Gookin, Pages: 240, Published: 2007
Windows XP Home Edition: The Missing Manual Authors: David Pogue, Pages: 612, Published: 2004
Mac OS X: The Missing Manual Authors: David Pogue, Pages: 583, Published: 2002
Application Development Using C# and .NET Authors: Michael Stiefel, Robert J. Oberg, Pages: 623, Published: 2002
The Macintosh Bible: Thousands of Basic and Advanced Tips, Tricks, and Shortcuts Logically Organized and Fully Indexed Authors: Sharon Aker, Arthur Naiman, Pages: 1241, Published: 1993
Proceedings of the IEEE 1997 National Aerospace and Electronics Conference, NAECON 1997: Held at the U.S. Air and Trade Show, Dayton, Ohio, July 14-17, 1997 Authors: Institute of Electrical & Electronics Engineers, Institute of Electrical and Electronics Engineers Dayton Section, IEEE National Aerospace, IEEE Aerospace and Electronic Systems Society, IEEE Aerospace and Electronic Systems Society, Electronics Conference, IEEE., Dayton Section, Pages: 1079, Published: 1997
The Psychology of Menu Selection: Designing Cognitive Control at the Human/computer Interface Authors: Kent L. Norman, Pages: 350, Published: 1991

Web:
ASP.NET Menu Control Overview The ASP.NET Menu control allows you to develop both statically and dynamically displayed menus for your ASP.NET Web pages. You can configure the contents of ...
Menu Class (System.Web.UI.WebControls) When the user clicks a menu item, the Menu control can either navigate to a linked Web page or ..... Bind the Menu control to a SiteMapDataSource control. ...
CodeProject: Populating Menu Control in ASP.NET 2.0 - using ... An article on how to populate the Menu control in ASP.NET 2.0 using different data sources.; Author: azamsharp; Section: Menus; Chapter: Desktop ...
CoolMenu: A Silverlight Menu Control CoolMenu is a Silverlight container control that gives you a nice wave-like effect as you move your mouse over the menu items. Clicking a menu item causes ...
ASP.NET 2.0: Using the Menu Control NET 2.0 controls is the Menu Control. Once you get past the short learning curve , its easy to set up and maintain, and highly customizable. ...
ASP.NET AJAX Menu Control: Drop Down JavaScript Menu – Office 2007 ... Drop-down Javascript Menu Control for ASP.NET AJAX by Telerik - vendor of ASP. NET and Windows Forms UI components, Content Management Systems (CMS), ...
Asp.Net Menu Control Binding with XMLDataSource - Binding ... This article explains the concept of building dynamic navigation control in web applications using Asp.Net Menu Control binding with XMLDataSource.
Using the YUI Menu Control May 2, 2007 ... Once you have downloaded it, open it and look for the following files which the menu control depends on for its behavior and default ...
Flex 3 - Menu control The Menu control is a pop-up control that contains a menu of individually selectable choices. You use ActionScript to create a Menu control that pops up in ...
ASP.NET Menu - Drop Down Menu Control by ComponentArt Complete Client-side API: ComponentArt Menu is the only menu control featuring a complete client-side API: with the ability to create, change or delete menu ...

Videos:
Silverlight FishEye menu control This control allows to dinamicallay create a fish eye menu based on Silverlight technology.
Adding Visual Studio 2008 Menu Control to A Website Navigation is very important in a website, in this video i'll be showing you how to easily add navigation to your website using the web.sitemap file ...
How to Make Control Panel Display as a Menu in Start Menu A how to on how to make Windows Vista's Control Panel show up as a menu within the Start Menu
NES Goonies 2 (USA) in 16:45.85 Made by Johan Södling (aka. Randil). The previous Goonies 2 movie was faster than its predecessor because of careful menu control. This movie is fas...
Star Fox (SNES) - Control Menu (Pumarega Type D Remix) This is a quick remix I put together of the StarFox (SNES) Control Menu music. I wanted a kind of space-hop vibe to it. I'm sure I'm going to piss ...
Dr. Terrence Deacon - The Symbolic Species - Part 2 - The Self-Organizing Brain This is part 2 of the Children of The Code Project's interview with leading brain scientist Dr. Terrence Deacon. A full transcript of the interview a...
iriver clix 4gb part 5 menu y control del iriver clix 4gb
Dr. Terrence Deacon - The Symbolic Species - Part 4 - Brain Size Differentiation This is part 4 of the Children of The Code Project's interview with leading brain scientist Dr. Terrence Deacon. A full transcript of the interview a...
Yu-Gi-Oh! Power of Chaos JOEY THE PASSION All Cards Vista PLEASE READ THE DESCRIPTION. http://buianhtuan.wordpress.com/2007/06/04/download-yu-gi-oh-power-of-chaos/ Download EXE Patch: http://m0007.gamecopyw...
Dr. Terrence Deacon - The Symbolic Species - Part 10 Verbal Self Reflectivity This is part 10 of the Children of The Code Project's interview with leading brain scientist Dr. Terrence Deacon. A full transcript of the interview ...




Search This Site:










module mechanics tutorials (free)

setting up an sql connection

how can i retrieve who i am after logging in to my website?

sha1managed() not found

how can i automate the creation of default users in asp.net?

funny things going on...

how disable user.identety.name credential cache

xml file structure

regarding tree view

major major css overiding issue!!! please help

please help login variable sessions

have to explicitly add resources to project after conversion

login control => custom database => "remember me" does not validate user again?

does anyone know how to edit catalook?

[:'(] [help]webpart can't work in iis

forms authentication with active directory in multiple domains in asp.net 2.0 fails if one domain credential is incorrect

rss information for links doesn't seem to show up anywhere

forms authentication ---- how to make page expire?

page level control?

how to get data from textbox into the sql database table plz help...

menu selected item

error creating set and deployment

purgeeventlog

file security in dnn 3.2

dnn.com forums are busted...

windows authentication - child portals

modules missing from 3.1.1

.net studio 2005 with 1.1 framework?

hosting need of asp 2.0 and sql 2005

stopping windows authentication sometimes

 
All Times Are GMT