ASP.NET custom user control cannot access sitemap
I have a footer that I am adding to a开发者_StackOverflow中文版 masterpage. Within this footer, if constructs menus based on the Current Node of the sitemap, however the sitemap is coming back as null. Does anyone know how to fix this issue.
Thank you
Try using Page.Master.FindControl()
this.Page.Master.FindControl("SiteMapID1");
I figured this out last night. I just grabbed the SiteMap root node from the Master Page.
精彩评论