Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2009, 10:57 AM
Friend of Wrox
 
Join Date: Sep 2009
Posts: 165
Thanks: 5
Thanked 6 Times in 6 Posts
Arrow multiple sitemaps

Hello friends,
The web.sitemap is working fine on the main masterpage.
I wanna add the same on the ManagementMaster.master page. I created new sitemap named web2.sitemap file & gave a reference to it with the provider set to this new sitamap file in web.config file but it is not working.
in web.config file I added the following.
Code:
<siteMap enabled ="true ">
            <providers>
               <add name ="SiteFile1" type ="System.Web.XmlSiteMapProvider" siteMapFile="~/Web.sitemap"/>
             <add name ="SiteFile2" type ="System.Web.XmlSiteMapProvider" siteMapFile="~/Web2.sitemap"/>
            </providers> 
</siteMap>
and in the Menu Control I added as following
Code:
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataource1" 
                        Orientation="Horizontal" BackColor="#B5C7DE" DynamicHorizontalOffset="2" 
                        Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" 
                        StaticSubMenuIndent="10px" >
                    <StaticSelectedStyle CssClass="StaticSelectedStyle" BackColor="#507CD1" /> 
<StaticMenuItemStyle CssClass="StaticMenuItemStyle" HorizontalPadding="5px" VerticalPadding="2px" />
                        <DynamicMenuStyle BackColor="#B5C7DE" />
                        <DynamicSelectedStyle BackColor="#507CD1" />
<DynamicMenuItemStyle CssClass="DynamicMenuItemStyle" />
<DynamicHoverStyle CssClass="DynamicHoverStyle" BackColor="#284E98" ForeColor="White" /> 
<StaticHoverStyle CssClass="StaticHoverStyle" BackColor="#284E98" ForeColor="White" />
                    </asp:Menu>
				    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" 
                        SiteMapProvider="SiteFile2" ShowStartingNode="False"/>
Any suggestion is respected.
Thank you..........

Last edited by jack_hilary; December 5th, 2009 at 11:08 AM..
 
Old December 5th, 2009, 11:00 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sigh...... Why oh why is it that you don't Google before you ask these questions? Can you please explain that to me? Why waste your own time byy posting a question here if you can have the answer in a split second with a Google search:

http://www.google.nl/search?hl=nl&so...&meta=&aq=f&oq=

The first hit is an in-depth explanation of the process. The next 19 results provide you with useful background and examples.

Why don't you Google first?
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 5th, 2009, 11:51 AM
Friend of Wrox
 
Join Date: Sep 2009
Posts: 165
Thanks: 5
Thanked 6 Times in 6 Posts
Arrow

well Sir, I do google search before I post a question here.
I could put provider in web.config file after google search. And out of 20 results are again questions/posts like I post.
And no doubt there are solutions are also there but most of them do not fit into scenario. They get problem at some stage as their scenario is different.
I first decided to google it because you always suggest google search.
OK I will try some more searches.
Thank you once again.
 
Old December 5th, 2009, 12:50 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Really? Youy must be using a different Google. Here's what I get:

http://www.google.com/search?hl=en&s...s&aq=f&oq=&aqi=

http://msdn.microsoft.com/en-us/library/ms178426.aspx
http://www.codeproject.com/KB/aspnet...leSiteMap.aspx
http://weblogs.asp.net/scottgu/archi...20/431019.aspx
http://geekswithblogs.net/dlussier/a...04/115848.aspx
http://forums.asp.net/p/1056791/1506144.aspx

I could go on, but by the time you've *read* these articles, you know more about multiple sitemaps than you probably care to.

One more request: can you please post your messages in the general ASP.NET categories since these type of questions aren't related to my book directly? This greatly improves your chances on an answer......

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 14th, 2009, 11:30 AM
Friend of Wrox
 
Join Date: Sep 2009
Posts: 165
Thanks: 5
Thanked 6 Times in 6 Posts
Arrow

sorry,
the first post I posted. There was an error (well the method I used was absolutely correct and also you suggested the links, one of them also suggested the same. Still thanks for links)
The only error was mistyping (although typing manually is not recommended but somehow one letter was deleted and nonexisting datasource was being looked for binding to menu control).
sorry for silly mistake and thanks for links.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7 Navigation multiple sitemaps babak BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 November 14th, 2008 08:15 AM
Problems with localization and sitemaps cheets ASP.NET 2.0 Basics 1 March 1st, 2007 01:32 PM
Using SiteMaps moedev ASP.NET 2.0 Basics 0 December 11th, 2006 09:51 PM
sitemaps zoltac007 ASP.NET 1.0 and 1.1 Basics 0 April 4th, 2006 01:09 PM
Updating multiple Rows from multiple fields in ASP vdm_nana SQL Server ASP 0 April 1st, 2004 04:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.