Terry

Terry

  • NA
  • 148
  • 0

siteMapNode, SiteMapPath, Routes, Parameters

May 9 2015 6:37 AM

Hi, 

   In my RouteConfigs.cs, I have set :
            routes.MapPageRoute("Import", "Import/{ImportType}", "~/Views/ImportData.aspx");

So to call ImportData.aspx, ImportType parameter is to be passed.
To call the above from code-Behind :
            Response.RedirectToRoute("Import", new { ImportType = "Inquiry" });


In ImportData, I access the parameters as :
                if (Page.RouteData.Values["ImportType"] != null)
                {
                    ImportType = (string)Page.RouteData.Values["ImportType"];
                }


In my web.SiteMap file, I added :
        <siteMapNode url="~/Views/ImportData.aspx" title="Import" description="Import From Excel"  />

  Over here I can't find a way to pass Parameter ImportType ?

In my Site.Master, I have added :
                <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
                <span class="breadcrumb">
                    <asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath>
                </span>


But, I can't find any sitemap details in it !! 


Any idea how to solve the above 2 queries reg SiteMapNode & SiteMapPath !!
kindly help me.


Thanks