CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 3/1/2008 7:21:05 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 5 Views: 461 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
unggy
Asp.Net User
One Web.sitemap for multiple SiteMapDataSource / Menus3/1/2008 7:21:05 PM

1

My application contains multiple menus and i just to use one sitemap to power all menus.

web.sitemap example...

<siteMapNode url="Default.aspx" title="Home" >
<siteMapNode title="Products Menu" >
<siteMapNode url="Products/FirstProduct.aspx" title="First Product" description="The description of the First Product" />
<siteMapNode url="Products/SecondProduct.aspx" title="Second Product" description="The description of the Second Product" />
</siteMapNode>
<siteMapNode title="Service Menu" >
<siteMapNode url="Services/FirstService.aspx" title="First Service" description="The description of the First Service" />
<siteMapNode url="Services/SecondService.aspx" title="Second Service" description="The description of the Second Service" />
</siteMapNode>
</siteMapNode>
How do i generate two different menus from it? Product and Service menu.  I know i can set StartingNodeUrl using the SiteMapDataSource but the parent menu nodes do not have urls.  Any ideas?
 
 
jsharratt
Asp.Net User
Re: One Web.sitemap for multiple SiteMapDataSource / Menus3/2/2008 2:41:07 AM

0

Hi unggy,

The only quick and dirty way I can see of getting this to work would be to do assign a url of  #services and #products to the "Products Menu" and the "Service Menu" nodes and use this as the staring url on your datasource.  It will work as the # is basically an anchor for usually some content on the page but it wont matter.

Will try and think of a better solution but I have not really used the sitemap feature that much.

Hope this helps,
Jon Sharrat

unggy
Asp.Net User
Re: One Web.sitemap for multiple SiteMapDataSource / Menus3/2/2008 2:49:50 AM

0

Thanks for the reply. I have tried using #servicemenu but it does not work. I get a "Could not find the sitemap node with URL" error. There must be a way round this!
jsharratt
Asp.Net User
Re: One Web.sitemap for multiple SiteMapDataSource / Menus3/2/2008 3:03:27 AM

0

<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode url="Default.aspx" title="Home" >

<siteMapNode url="#productmenu" title="Products Menu" >

<siteMapNode

url="Products/FirstProduct.aspx"

title="First Product"

description="The description of the First Product" />

<siteMapNode

url="Products/SecondProduct.aspx"

title="Second Product"

description="The description of the Second Product" />

</siteMapNode>

<siteMapNode url="#servicemenu" title="Service Menu" >

<siteMapNode

url="Services/FirstService.aspx"

title="First Service"

description="The description of the First Service" />

<siteMapNode

url="Services/SecondService.aspx"

title="Second Service"

description="The description of the Second Service" />

</siteMapNode>

</siteMapNode>

</siteMap>

StartingNodeUrl="#servicemenu"

 

 

I tried the above and it seemd to work for myself. Just double check that the StartingNodeUrl mataches the url on the siteMapNode in the "web.sitemap" file.

 

Let me know how you get on,
Jon Sharratt
 

 
unggy
Asp.Net User
Re: One Web.sitemap for multiple SiteMapDataSource / Menus3/2/2008 10:17:58 AM

0

Hi Jon,

Cheers for that! I finally manage to get it work.

The problem was, the page i was calling it from was in a folder and not the root. I just had to change the from StartingNodeUrl="#servicemenu" to StartingNodeUrl="~/#servicemenu"

I really appreciate you taking the time to help!

Thanks!

jsharratt
Asp.Net User
Re: One Web.sitemap for multiple SiteMapDataSource / Menus3/2/2008 11:18:04 AM

0

No problem, thanks for remembering to mark it as the answer, much appreciated.

Jon

6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
ASP.NET 2.0 Website programming: problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Pro ASP.NET 2.0 in VB 2005 Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Beginning ASP.NET 3.5 in VB 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 956, Published: 2007
Beginning ASP.NET 3.5 in C# 2008: from novice to professional Authors: Matthew MacDonald, Pages: 954, Published: 2007

Web:
One Web.sitemap for multiple SiteMapDataSource / Menus - ASP.NET ... My application contains multiple menus and i just to use one sitemap to power all menus. web.sitemap example. ...
SiteMapdatasource and Web.sitemap - ASP.NET Forums I had taken one menu tool from the toolbox in my master page and configured with ... Since you are using multiple web.sitemap files, ...
Dotnet-Friends.com | Website Navigation or Menu with ... Jul 5, 2007 ... How to: Configure Multiple Site Maps and Site-Map Providers ... How to: Filter the Nodes Retrieved by SiteMapDataSource Web Server Controls ...
Using multiple sitemaps in a web site - Patrice Paré Two site map providers in the web.config file. And one more menu control bound to another siteMapDataSource control in the master page: ...
SiteMapDataSource Language Filter: All Language Filter: Multiple Language Filter: Visual Basic . ... You can have only one sitemap per site. By default the SiteMapDataSource ... It should stay in the root level of your project and should be named web.sitemap . ... menu, set the DataSourceID to the ID of the SiteMapDataSource control. ...

One Web.sitemap for multiple SiteMapDataSource / Menus - ng.asp ... One Web.sitemap for multiple SiteMapDataSource / Menus, > ROOT > NEWSGROUP > Asp .Net Forum ...
MenuControl - SiteMapDataSource - ng.asp-net-forum ... One Web.sitemap for multiple SiteMapDataSource / Menus - ng.asp ... And one more menu control bound to another siteMapDataSource control in ...
Can VWD 2005 Express Have More Than One Web.sitemap? - ng.asp-net ... Can VWD 2005 Express Have More Than One Web.sitemap?, > ROOT > NEWSGROUP > Asp. Net Forum ... Yep -- you can have multiple sitemaps within your project. ... What I'm trying to do is have a different SiteMapDataSource show up in the choices. ... sub-menu not showing when there is an iframe on the page ...
Sitemap error: Could not find the sitemap node with URL - ng.asp ... One Web.sitemap for multiple SiteMapDataSource / Menus - ng.asp ... I have tried using #servicemenu but it does not work. ...
Set SiteMapProvider property of SiteMapDataSource dynamically - ng ... how to use more than one web.sitemap? - ASP.NET Forums geek82 is right, ... If not, SiteMapDataSource uses ... Skipping first node in XML with Menu control ...












menu control, selecting item programitcally

css images + alternatetext (?)

loading a master page and a user control

bug: setting skinid with dynamic controls doesn't work with stylesheettheme

tab control similar to browser tab

maximizing the content doesn't works with table?

sitemap, menu and treeview question

dynamic menu in asp.net

menu control & flash swf in firefox

treee view and value path

customized sitemappath for a forums site

changing output type of master page

is it possible to use two separate sitemaps

menu with levelmenuitemstyles

datagrid problem with master pages

how can i access a treeview node from other event handlers?

error: unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. bool

is it a good idea for your sign on page to have a master template(thinking security)

problem with master pages

previouspage of masterpage alway null

sqlsitemapprovider and onsitemapchanged

skin files and grid view control etc

themes and third-party controls

update panel an flash object

changing the contentplaceholderid value

menu control with sitemapdatasource not firing menuitemclick

treeview, nodes, and autogeneratedatabindings

show different content pages based on selction in master page without refreshing

sitemap: how to add a click event handler to a node?

master page file title

themes and caching

customizing menu control

sitemaps, menus, and security trimming

how to set a image path to consume multiple themes?

need to know how to alter master page css settings for just one page.

dynamic loading of master pages

postback problem

treeview node text formatting

master page background image problem

how do i reference a gridview column in a .skin file?

contentplaceholder can only be used in .master files

populating gridview1 in masterpage content1 with gridview2 in content2.

can't pass parameter to stored proc from treeview control

sitemappath have bad link

compiling .cs pages

sitemaster pageload vs content page pageload

how to hidden the root from treeview or how to display several root nodes?

menu control fading

masterpage and postback

multiple page layouts with same data/code

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT