Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

SiteMap Problem

Avatar of jedistar
jedistarFlag for Singapore asked on
ASP.NET
4 Comments1 Solution589 ViewsLast Modified:
Hi,

I'm using 6 diff sitemaps on 6 treeviews, however when i load the page, the 6 treeviews will display the first sitemap
SiteMapDataSource1 and not its respective sitemap. Any idea?

web.config:
            <siteMap defaultProvider="SiteMapDataSource1">
                  <providers>
                     <add name="SiteMapDataSource1" type="System.Web.XmlSiteMapProvider" siteMapFile="sitemap/web.sitemap" />
                     <add name="SiteMapDataSource2" type="System.Web.XmlSiteMapProvider" siteMapFile="sitemap/web2.sitemap" />
                     <add name="SiteMapDataSource3" type="System.Web.XmlSiteMapProvider" siteMapFile="sitemap/web3.sitemap" />
                     <add name="SiteMapDataSource4" type="System.Web.XmlSiteMapProvider" siteMapFile="sitemap/web4.sitemap" />
                     <add name="SiteMapDataSource5" type="System.Web.XmlSiteMapProvider" siteMapFile="sitemap/web5.sitemap" />
                     <add name="SiteMapDataSource6" type="System.Web.XmlSiteMapProvider" siteMapFile="sitemap/web6.sitemap" />
                  </providers>
          </siteMap>

sitemap.aspx file:

                              <form id="form1" runat="server">
                              <asp:SiteMapDataSource ID="SiteMapDataSource1" Runat="server" />
                              <asp:SiteMapDataSource ID="SiteMapDataSource2" Runat="server" />
                              <asp:SiteMapDataSource ID="SiteMapDataSource3" Runat="server" />
                              <asp:SiteMapDataSource ID="SiteMapDataSource4" Runat="server" />
                              <asp:SiteMapDataSource ID="SiteMapDataSource5" Runat="server" />
                              <asp:SiteMapDataSource ID="SiteMapDataSource6" Runat="server" />
                              
                              <table><tr><td width="1200">
                              <div class="panels">
                                    <div class="sitemap">
                                                              
                                      <h2>Strategic Policy</h2>
                                      <asp:TreeView ID="TreeView1" Runat="Server" DataSourceID="SiteMapDataSource1" ImageSet="MSDN">
                                        <SelectedNodeStyle  BackColor="#B5B5B5"></SelectedNodeStyle>
                                    <NodeStyle VerticalPadding="2" Font-Size="10pt" HorizontalPadding="2" ForeColor="Black"></NodeStyle>
                                         <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA"></HoverNodeStyle>
                                      </asp:TreeView>
                                     
                                    </div>

                                    <div class="sitemap">                                                              
                                    
                                      <h2>Program Management</h2>
                                      <asp:TreeView ID="TreeView2" Runat="Server" DataSourceID="SiteMapDataSource2" ImageSet="MSDN">
                                        <SelectedNodeStyle  BackColor="#B5B5B5"></SelectedNodeStyle>
                                    <NodeStyle VerticalPadding="2" Font-Size="10pt" HorizontalPadding="2" ForeColor="Black"></NodeStyle>
                                         <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA"></HoverNodeStyle>
                                      </asp:TreeView>
                                     
                                    </div>
                                    
                                    <div class="sitemap">                                                              
                                    
                                      <h2>Service Delivery</h2>
                                      <asp:TreeView ID="TreeView3" Runat="Server" DataSourceID="SiteMapDataSource3" ImageSet="MSDN">
                                        <SelectedNodeStyle  BackColor="#B5B5B5"></SelectedNodeStyle>
                                    <NodeStyle VerticalPadding="2" Font-Size="10pt" HorizontalPadding="2" ForeColor="Black"></NodeStyle>
                                         <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA"></HoverNodeStyle>
                                      </asp:TreeView>
                                     
                                      </div>
                                     
                              </div>
                              </td></tr></table>
                              <table><tr><td width="1200">
                              <div class="panels">  
                                      <div class="sitemap">
                                     
                                      <h2>Smart Service Queensland</h2>
                                      <asp:TreeView ID="TreeView4" Runat="Server" DataSourceID="SiteMapDataSource4" ImageSet="MSDN">
                                        <SelectedNodeStyle  BackColor="#B5B5B5"></SelectedNodeStyle>
                                    <NodeStyle VerticalPadding="2" Font-Size="10pt" HorizontalPadding="2" ForeColor="Black"></NodeStyle>
                                         <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA"></HoverNodeStyle>
                                      </asp:TreeView>
                                     
                                    </div>

                                    <div class="sitemap">                                                              
                                    
                                      <h2>Shared Information Solutions</h2>
                                      <asp:TreeView ID="TreeView5" Runat="Server" DataSourceID="SiteMapDataSource5" ImageSet="MSDN">
                                        <SelectedNodeStyle  BackColor="#B5B5B5"></SelectedNodeStyle>
                                    <NodeStyle VerticalPadding="2" Font-Size="10pt" HorizontalPadding="2" ForeColor="Black"></NodeStyle>
                                         <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA"></HoverNodeStyle>
                                      </asp:TreeView>
                                     
                                    </div>
                                    
                                    <div class="sitemap">                                                              
                                    
                                      <h2>Corporate & Execute Services</h2>
                                      <asp:TreeView ID="TreeView6" Runat="Server" DataSourceID="SiteMapDataSource6" ImageSet="MSDN">
                                        <SelectedNodeStyle  BackColor="#B5B5B5"></SelectedNodeStyle>
                                    <NodeStyle VerticalPadding="2" Font-Size="10pt" HorizontalPadding="2" ForeColor="Black"></NodeStyle>
                                         <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA"></HoverNodeStyle>
                                      </asp:TreeView>
                                     
                                    </div>
                                    </td></tr></table>
                                    </form>
ASKER CERTIFIED SOLUTION
Avatar of Sammy
SammyFlag of Canada image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers