.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


Posted By:      Posted Date: October 07, 2010    Points: 0   Category :SharePoint

I am deploying two SharePoint solutions, so logically I have two layouts.sitemap xml files. One is called

layouts.sitemap.projectname.xml and the second I called

now I run stsadm -o copyappbincontent and notice only the second xml file was submitted.

So I rename the files from layouts.sitemap.projectname.xml to

layouts.sitemap.projectname.subnamespace1.xml and leaving the second

after stsadm -o copyappbincontent now only the first xml file is submitted....

when I remove the projectname and rename them to


the second xml file is working, how random is this!!

So I got frustrated and merged the two files, now neither of the breadcrumb items are working....


View Complete Post

More Related Resource Links

Sharepoint 2010 - breadcrumb not updating correctly from layouts.sitemap



I have some custom ASPX pages that I used in Sharepoint 2007 that I am now putting onto Sharepoint 2010. They use the layouts.sitemap file to update the breadcrumb trail when they are navigated to in Sharepoint. However when I put them into Sharepoint 2010 and make the same modifications to layouts.sitemap the breadcrumb trail is not updating correctly. It is only showing the current page in the breadcrumb and not where it was navigated from.

Any ideas why this would not work in Sharepoint 2010?

Many thanks,



Custom Control Design-Time SiteMap Provider Error


Greetings - I was referred here by MSDN forums hope this is the right place -  

I have a custom control (:WebControl) that renders web.sitemap in a specific way. While it runs error free and produces the expected result, at Design-Time it complains

Error Creating Control - MyControl  The provider 'AspNetXmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.

I have discovered that the error is cause by this line of code:

string div = string.Format("<div class='{0}' id='{1}'>{2}</div>", this.CssClass, this.ID.ToString(), EnumerateNodesRecursive(SiteMap.RootNode, level));

or more specifically, by the reference to SiteMap.RootNode - I am not clear what is missing thoough because I have configured the SiteMapProvider in web.config as this:

        <add name="AspNetXmlSiteMapProvider" 
             type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 

ImageURL SiteMap Node


Hi Can anyone tell me how i can add the ImageURL from a sitemap into a navigation menu, i had this working with webforms but cannot get it to work with mcv

var sbMenuHelper = new StringBuilder();

sbMenuHelper.Append("<ul class='cssMenu'>");

var topLevelNodes = SiteMap.RootNode.ChildNodes;
foreach (SiteMapNode node in topLevelNodes)
    if (SiteMap.CurrentNode == node)
        sbMenuHelper.AppendFormat("<a href='{0}'>{1}</a>", node.Url, helper.Encode(node.Title));

return sbMenuHelper.ToString();

        description="Contact Us"

Linq Save to ror.xml or other sitemap.xml


Hi there, 

I'm trying to make a script for a site, that updates the sitemaps in the background.

I didn't create this site, and someone before me added in the ror.xml and sitemap.xml and urllist.txt files.

I want to update these all at the same time. If the url is not in there already of course...

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:ror="http://rorweb.com/0.1/" >
  <title>ROR Sitemap for http://www.envirospec.co.nz/</title>

Trying to get to a page via an email link. Could the sitemap be stopping this?


I had this working.  I would email a link to a page (i.e. Work.aspx), and using the code below, the user would be routed to the login page and then sent  to Work.aspx after logging in.

But since I added a site map this isn't working.  I always go directly to my home page.  If I set Work.aspx as my start page in VS it works, but not if I click a link in the email.

Any thoughts?

 protected void Page_Load(object sender, EventArgs e)


        if (!Page.User.Identity.IsAuthenticated)

            Response.Redirect("~/Login.aspx" + "?ReturnUrl=~/Work.aspx");


    protected void Page_Load(object sender, EventArgs e)
        if (!Page.User.Identity.IsAuthenticated)

sitemap control user rights enable and disable



iam using masterpage and sitemap in my project, what i want to is that

if user login is did, based on the user previlage in need to show the sitemap menu page

if user i have the previlage to see the page then i should enable that page otherwise

i need disable that page

looking for the valuable suggestions

Sitemap issue

Hello, This question pertains to the web.sitemap and the sitemap control. I have the following entry in the web.sitemap:<siteMapNode url="Default.aspx" title="Home" description=""> <siteMapNode url="" title="Articles" description=""> <siteMapNode url="~/TBSArticles/ShowCategories.aspx" title="Categories" description="" /> <siteMapNode url="~/TBSArticles/ProductShowCase.aspx" title="Product Showcase" description="" /> <siteMapNode url="~/TBSArticles/ProductReview.aspx" title="Product Review" description="" /> </siteMapNode> </siteMapNode> </siteMap> The Home and Article texts show as separate tabs on the menu control. Under Article, "Categories", "Product Showcase" and  "Product Review" show as drop down menus. When I click on "Categories" the site map control shows "Home -> Article -> Categories", and the ShowCategories.aspx page is displayed on the browser . The ShowCategories.aspx page has several links. When any one is clicked it it leads to the BrowseArticles.aspx page with an unique querystring value. The problem is that at this stage, the sitemap becomes blank an

Create sitemap

I have to create a sitemap for my website in asp.net 2.0. Can anybody tell me the procedure for the same.I am totally new to this concept.. 

URL routing with a dynamic .sitemap file

Hi,I've implemented URL routing now I've upgraded to .NET 4 following http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx.The only problem I've encountered is with the .sitemap file. If I put, for example: <siteMapNode url="~/recipes/Starters" title="Browse Starters"> it renders correctly. However, I need to do something like this: <siteMapNode url="~/recipes/{category}" title="Browse {category}"> - i.e. dynamically giving a titleOr, I'd settle for something like this: <siteMapNode url="~/recipes/*" title="Browse Recipes"> - i.e. covering all recipe pages Has anyone found a nice solution to this?

localization sitemap on MasterPage

Hi Everyone, i am new in localization.I need to create a website in dual language.I plan to put the sitemap and change language dropdownlist in the master page.May anyone advice on how to i change the sitemap language at treeview and Menu on master page?

problem with sitemap schema 'xsi:schemaLocation' in XML file creation

SqlConnection conn = new SqlConnection(connStr); conn.Open(); string sql = "select top 10 catnum,cast(case when isnull(onhand,0) < 5 then 0 else round((onhand/2),1) end as int) as onhand from dbo.V_OnHand with (nolock)"; SqlCommand cmd = new SqlCommand(sql, conn); XmlDocument doc = new XmlDocument(); XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "UTF-8", null); XmlElement rootNode = doc.CreateElement("inventory"); doc.InsertBefore(dec, doc.DocumentElement); rootNode.SetAttribute("xmlns", "http://seller.marketplace.tests.com/inventory/v1"); rootNode.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); rootNode.SetAttribute("xsi:schemaLocation", "http://sellersupport.domain.test.com/test1/s/schema/inventory/inventory-xml-feed-v1.xsd"); doc.AppendChild(rootNode); XmlElement fbm = doc.CreateElement("inventory"); doc.DocumentElement.PrependChild(fbm); SqlDataReader rdr1 = cmd.ExecuteReader(); while (rdr1.Read()) { XmlElement item = doc.CreateElement("item"); item.Set

Creating image based site navigation using standard sitemap

I know how to create a normal menu and change them the way i want using css, but I dont know how to use images instead of text.I want to make it look cooler using images so in order to do that, I haven't got any ideas at all :(I have seen many websites on internet like this and I dont think its a difficult thing to do for some of you here.Could you please guide me or show me the way forward ? Thanks. 

Javascript error when attempting to switch page layouts in SharePoint 2010

I hope I put this in the correct forum. I am experiencing the following error when attempting to change the layout of an existing SharePoint 2010 page. But it does not seem to happen on all page types, just publishing pages. This error is happening on both the development server and both test servers. I have look in to the logs, since if it a javascript error there was nothing, which would be expected but I had to try. I have look at the cui.js file but was unable to spend enough time trying to figure out what exactly is going on in this file. Error being received ... Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Tue, 7 Sep 2010 21:10:54 UTC Message: Object required Line: 2 Char: 6422 Code: 0 URI: http://devintranet2010.myconexus.ca:85/_layouts/cui.js?rev=wvoVpqlQb30nGo4DjDk8Kg%3D%3D   If anyone has any ides or can point me in a direction that will allow me to productively continue my investigation, the information would be greatly appreciated. Regards Kyle

Sitemap refresh

Hi,I am learning ASP and i have one problem.I've menu which is created from Sitemap. Look here: 1. public class SqlSiteMapProvider : StaticSiteMapProvider 2. { 3. 4. private SiteMapNode myRootNode; 5. private BlogEntities myEntities; 6. 7. public SqlSiteMapProvider() 8. { 9. myRootNode = null; 10. } 11. 12. public override SiteMapNode BuildSiteMap() 13. { 14. using (myEntities = new BlogEntities()) 15. { 16. lock (this) 17. { 18. if (myRootNode == null) 19. { 20. myRootNode = new SiteMapNode(this, Guid.NewGuid().ToString(), this.Url, this.Title); 21. foreach (Category aCategory in myEntities.Categories) 22. { 23. SiteMapNode aNode = new SiteMapNode(this, Guid.NewGuid().ToString(), string.Format(this.UrlFormatString, aCategory.CategoryID.ToString()), aCategory.Title.ToString()); 24. AddNode(aNode, myRootNode); 25. } 26. } 27. } 28. } 29. re

update page after editing sitemap

Hey guys have written the following code to allow authorised users to add categories to a shopping catalog:    Sub editXml()        If txtNewCat.Text.Count > 0 Then            Dim sMap As New XmlDocument            sMap.Load(Server.MapPath("App_Data/Web.sitemap"))            Dim doc As XmlNode = sMap.ChildNodes(1)            Dim root As XmlNode = doc.ChildNodes(0)            Dim pNode As XmlNode            For Each node As XmlNode In root.ChildNodes                If node.Attributes(0).Value = "Catalog.aspx" Then                    pNode = node                    Dim nNode As XmlNode = sMap.CreateNode(XmlNodeType.Element, "siteMapNode", Nothing)           &nb

how to make a dynamic sitemap

HelloI need to make a sitemap with all the products i have in database.I can make it easly in aspx web file, but is it better if i make it in Web.sitemap file? Would search engines find it?And if is better to make it in Web.sitemap, how can i create siteMapNode for each product i have (and i add) in database?Please help meThank you

How do I change the top menu navigation for layouts like Site Settings?

I used something similiar to what Kalik posted on this thread, however, I'm not seeing the same results in layouts like Site Settings.  Any answers would be appreciated. Thank you, Mike ADD TO TOP LINE! <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> ADD IN HEADER AREA! <PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" runat="server" SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true" StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false" TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/> </HEAD> REPLACE STANDARD TOP NAV CODE! <!--- Modified Top Nav ---->    <SharePoint:aspmenu    ID="GlobalNav"    Runat="server"    DataSourceID="siteMapDataSource1"    Orientation="Horizontal"     MaximumDynamicDisplayLevels="1"     StaticPopoutImageUrl="/_layouts/images/menudark.gif"    StaticSubMenuIndent="0px"  &nb
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