I have this configuration in my application.
~/sitemap.aspx
~/Web.sitemap
~/mobile/sitemap.aspx
~/mobile/Web.sitemap
“mobile” folder is not an application and I cannot convert it due to some reason. Thus no webconfig file is there.
What I want to do here is to use ~/mobile/Web.sitemap as the sitemap datasource for the treeview control in ~/mobile/sitemap.aspx.
When I place this code:
<asp:SiteMapDataSource runat="server" ID="MobileSiteMap" />
<asp:TreeView ID="trvSiteMap" runat="server" DataSourceID="MobileSiteMap" />
it loads ~/Web.sitemap instead of ~/mobile/Web.sitemap
Any idea?
1: Add an entry to sitemap providers in your web.config that points to your mobile sitemap.
2: Set the SiteMapProvider property of your MobileSiteMap DataSource to this newly added sitemap.