Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET4.0
hello friends,
I have an issue using sitemap
here is my sitemap
<?xml version="1.0" encoding="utf-8" ?>
 
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
  <siteMapNode url="" title="Revenue Recognition">
    <siteMapNode title="Home" url="wf_Start.aspx"></siteMapNode>
    <siteMapNode title="Masters" url="">
      <siteMapNode title="Project Estimates and Variations" url="wf_PrjEstMain.aspx"/>
      <siteMapNode title="Timesheet Period Setup" url="wf_TimesheetDetails.aspx"/>
      <siteMapNode title="Project Details" url="wf_ProjectPref.aspx"/>
      <siteMapNode title="Map ePMO Project IDs to Contract" url="wf_MapEPMOProjectID.aspx"/>
    </siteMapNode>
    <siteMapNode title="Transaction" url="">
      <siteMapNode title="Upload/Download Timesheet" url="wf_UploadTimesheets.aspx"/>
      <siteMapNode title="Actual Costs" url="wf_ActualCost.aspx"/>
      <siteMapNode title="Forecast Costs(Cost to go)" url="wf_ForecastCost.aspx"/>
      <siteMapNode title="Billing Details" url="wf_BillingContingency.aspx?mode=B"/>
      <siteMapNode title="Contingency Release Details" url="wf_BillingContingency.aspx?mode=C"/>
    </siteMapNode>
    <siteMapNode title="Reports" url="">
      <siteMapNode title="Efforts Summary" url="wf_EffortsSummary.aspx"/>
      <siteMapNode title="Revenue Recognition" url="wf_RevRecogn.aspx" />
      <siteMapNode title="View All Attachments" url="wf_ViewAllNotesAtt.aspx?Mode=A"/>
      <siteMapNode title="View All Notes" url="wf_ViewAllNotesAtt.aspx?Mode=N"/>
      <siteMapNode title="Exception Report" url="wf_TSExceptionreport.aspx" />
    </siteMapNode>
    <siteMapNode title="Admin" url="">
      <siteMapNode title="Access Control" url="wf_AccessControl.aspx" />
      <siteMapNode title="Month Closing" url="wf_MonthClose.aspx" />
      <siteMapNode title="Map Sub-Contracts with Contracts" url="wf_MapSubContracts.aspx" />
      <siteMapNode title="Actual Costs Report" url="wf_actualcostsrep.aspx"/>
      <siteMapNode title="Revenue Recognition Consolidated Report" url="wf_RevRecConslRep.aspx"/>
    </siteMapNode>
  </siteMapNode>
</siteMap>
 
but when i bind it in master page, it does not get display in menu.
 
Is there anything wrong in structure??
 
Any help??
 
Thanks in advance
Posted 6-Sep-12 0:28am
Comments
manognya kota at 6-Sep-12 5:30am
   
how are you binding it in the master page?
dhage.prashant01 at 6-Sep-12 6:45am
   
This is how i bind
 
private void BindVerticalApplicationMenu()
{
if (string.IsNullOrEmpty(this.VerticalSiteMapProvider))
{
if (string.IsNullOrEmpty(ConfigurationManager.AppSettings["SiteMapProvider"]))
{
VerticalSiteMapDataSource.Provider = SiteMap.Providers["SiteMapProvider2"]; //Use default application menu.
}
else
{
VerticalSiteMapDataSource.Provider = SiteMap.Providers[ConfigurationManager.AppSettings["SiteMapProvider"].ToString()];
}
}
else
VerticalSiteMapDataSource.Provider = SiteMap.Providers[this.VerticalSiteMapProvider];
 
VerticalSiteMapDataSource.ShowStartingNode = false;
tvMenu.DataSourceID = "VerticalSiteMapDataSource";
tvMenu.DataBind();
 
for (int i = 0; i < tvMenu.Nodes.Count; i++)
{
if (tvMenu.Nodes[i].ChildNodes.Count > 0)
{
for (int j = 0; j < tvMenu.Nodes[i].ChildNodes.Count; j++)
{
tvMenu.Nodes[i].ChildNodes[j].ImageUrl = "~/commonproject/images/navbullet.gif";
}
}
}
}
 

But if i change content of site map it loads. But above mentioned sitemap is not getting loaded. Is there any XML syntax error?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I was missing to put role (role = "*")
i have added to every siteMapNode where URL = ""
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 289
1 DamithSL 225
2 OriginalGriff 175
3 Peter Leow 150
4 Afzaal Ahmad Zeeshan 95
0 OriginalGriff 7,355
1 DamithSL 5,254
2 Sergey Alexandrovich Kryukov 4,942
3 Maciej Los 4,906
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 6 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100